minigbm: make drv_add_combinations return nothing
Two reasons for this:
1) We can use drv_array for driver combinations (see next patch)
2) It's less verbose.
BUG=chromium:764871
TEST=gbmtest passes
Change-Id: I39bea6e2e9e4c76d2ca78566926a79bdc17f11d0
Reviewed-on: https://chromium-review.googlesource.com/758148
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
diff --git a/tegra.c b/tegra.c
index 4551fcf..f0651d7 100644
--- a/tegra.c
+++ b/tegra.c
@@ -179,7 +179,6 @@
static int tegra_init(struct driver *drv)
{
- int ret;
struct format_metadata metadata;
uint64_t use_flags = BO_USE_RENDER_MASK;
@@ -187,10 +186,8 @@
metadata.priority = 1;
metadata.modifier = DRM_FORMAT_MOD_LINEAR;
- ret = drv_add_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats),
- &metadata, use_flags);
- if (ret)
- return ret;
+ drv_add_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats),
+ &metadata, use_flags);
drv_modify_combination(drv, DRM_FORMAT_XRGB8888, &metadata, BO_USE_CURSOR | BO_USE_SCANOUT);
drv_modify_combination(drv, DRM_FORMAT_ARGB8888, &metadata, BO_USE_CURSOR | BO_USE_SCANOUT);
@@ -202,10 +199,8 @@
metadata.tiling = NV_MEM_KIND_C32_2CRA;
metadata.priority = 2;
- ret = drv_add_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats),
- &metadata, use_flags);
- if (ret)
- return ret;
+ drv_add_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats),
+ &metadata, use_flags);
drv_modify_combination(drv, DRM_FORMAT_XRGB8888, &metadata, BO_USE_SCANOUT);
drv_modify_combination(drv, DRM_FORMAT_ARGB8888, &metadata, BO_USE_SCANOUT);