At the current point where ret is being checked for non-zero it has not changed since it was initialized to zero, hence the check and the label unref are redundant and can be removed.
Unified · Split
| @@ -198,8 +198,6 @@ static int vc4_drm_bind(struct device *dev) · 197 unmodified lines | |||
| 198 | vc4_bo_cache_init(drm); | 198 | vc4_bo_cache_init(drm); |
| 199 | 199 | ||
| 200 | drm_mode_config_init(drm); | 200 | drm_mode_config_init(drm); |
| 201 | if (ret) | ||
| 202 | goto unref; | ||
| 203 | 201 | ||
| 204 | vc4_gem_init(drm); | 202 | vc4_gem_init(drm); |
| 205 | 203 | ||
| @@ -233,7 +231,6 @@ unbind_all: · 27 unmodified lines | |||
| 233 | component_unbind_all(dev, drm); | 231 | component_unbind_all(dev, drm); |
| 234 | gem_destroy: | 232 | gem_destroy: |
| 235 | vc4_gem_destroy(drm); | 233 | vc4_gem_destroy(drm); |
| 236 | unref: | ||
| 237 | drm_dev_unref(drm); | 234 | drm_dev_unref(drm); |
| 238 | vc4_bo_cache_destroy(drm); | 235 | vc4_bo_cache_destroy(drm); |
| 239 | return ret; | 236 | return ret; |