History

drm/i915: set "ret" correctly on error paths

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.

Dan Carpenter committed 9 years ago

Commit f4bf77b1 parent be02f751 file · +2 −0Browse files

Unified · Split

drivers/gpu/drm/i915/intel_display.c+2−0
@@ -9563,6 +9563,7 @@ int intel_get_load_detect_pipe(struct drm_connector *connector, · 9562 unmodified lines
9563 */9563 */
9564 if (!crtc) {9564 if (!crtc) {
9565 DRM_DEBUG_KMS("no pipe available for load-detect\n");9565 DRM_DEBUG_KMS("no pipe available for load-detect\n");
9566 ret = -ENODEV;
9566 goto fail;9567 goto fail;
9567 }9568 }
9568 9569
@@ -9619,6 +9620,7 @@ found: · 50 unmodified lines
9619 DRM_DEBUG_KMS("reusing fbdev for load-detection framebuffer\n");9620 DRM_DEBUG_KMS("reusing fbdev for load-detection framebuffer\n");
9620 if (IS_ERR(fb)) {9621 if (IS_ERR(fb)) {
9621 DRM_DEBUG_KMS("failed to allocate framebuffer for load-detection\n");9622 DRM_DEBUG_KMS("failed to allocate framebuffer for load-detection\n");
9623 ret = PTR_ERR(fb);
9622 goto fail;9624 goto fail;
9623 }9625 }
9624 9626

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t