0456-drm-vc4-remove-redundant-ret-status-check.patch 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 6c69e9ba4802bc0240a930ebacf171ddcf2f3d95 Mon Sep 17 00:00:00 2001
  2. From: Colin Ian King <colin.king@canonical.com>
  3. Date: Sat, 9 Jul 2016 23:26:03 +0100
  4. Subject: [PATCH] drm/vc4: remove redundant ret status check
  5. At the current point where ret is being checked for non-zero it has
  6. not changed since it was initialized to zero, hence the check and the
  7. label unref are redundant and can be removed.
  8. Signed-off-by: Colin Ian King <colin.king@canonical.com>
  9. Reviewed-by: Eric Anholt <eric@anholt.net>
  10. (cherry picked from commit deb4765db386db67626ffd075d8b5eb5fdf9c4f6)
  11. ---
  12. drivers/gpu/drm/vc4/vc4_drv.c | 3 ---
  13. 1 file changed, 3 deletions(-)
  14. --- a/drivers/gpu/drm/vc4/vc4_drv.c
  15. +++ b/drivers/gpu/drm/vc4/vc4_drv.c
  16. @@ -233,8 +233,6 @@ static int vc4_drm_bind(struct device *d
  17. vc4_bo_cache_init(drm);
  18. drm_mode_config_init(drm);
  19. - if (ret)
  20. - goto unref;
  21. vc4_gem_init(drm);
  22. @@ -268,7 +266,6 @@ unbind_all:
  23. component_unbind_all(dev, drm);
  24. gem_destroy:
  25. vc4_gem_destroy(drm);
  26. -unref:
  27. drm_dev_unref(drm);
  28. vc4_bo_cache_destroy(drm);
  29. return ret;