So that gralloc_gbm_handle_unregister() could return correct value
required by gralloctest.
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
return bo;
}
-void gbm_free(buffer_handle_t handle)
+int gbm_free(buffer_handle_t handle)
{
struct gbm_bo *bo = gralloc_gbm_bo_from_handle(handle);
if (!bo)
- return;
+ return -EINVAL;
gbm_bo_handle_map.erase(handle);
gbm_bo_destroy(bo);
+ return 0;
}
/*
*/
int gralloc_gbm_handle_unregister(buffer_handle_t handle)
{
- gbm_free(handle);
-
- return 0;
+ return gbm_free(handle);
}
/*
buffer_handle_t gralloc_gbm_bo_create(struct gbm_device *gbm,
int width, int height, int format, int usage, int *stride);
-void gbm_free(buffer_handle_t handle);
+int gbm_free(buffer_handle_t handle);
struct gbm_bo *gralloc_gbm_bo_from_handle(buffer_handle_t handle);
buffer_handle_t gralloc_gbm_bo_get_handle(struct gbm_bo *bo);