If "crtc" is NULL, then my static checker complains that "ret" isn't initialized on that path. It doesn't really cause a problem unless "ret" is somehow set to -EDEADLK which is not likely. Chris Wilson also noticed another error path where "ret" isn't set correctly.
Unified · Split
| @@ -9563,6 +9563,7 @@ int intel_get_load_detect_pipe(struct drm_connector *connector, · 9562 unmodified lines | ||
| 9563 | 9563 | */ |
| 9564 | 9564 | if (!crtc) { |
| 9565 | 9565 | DRM_DEBUG_KMS("no pipe available for load-detect\n"); |
| 9566 | + ret = -ENODEV; | |
| 9566 | 9567 | goto fail; |
| 9567 | 9568 | } |
| 9568 | 9569 | |
| @@ -9619,6 +9620,7 @@ found: · 50 unmodified lines | ||
| 9619 | 9620 | DRM_DEBUG_KMS("reusing fbdev for load-detection framebuffer\n"); |
| 9620 | 9621 | if (IS_ERR(fb)) { |
| 9621 | 9622 | DRM_DEBUG_KMS("failed to allocate framebuffer for load-detection\n"); |
| 9623 | + ret = PTR_ERR(fb); | |
| 9622 | 9624 | goto fail; |
| 9623 | 9625 | } |
| 9624 | 9626 | |