Skip to content

Commit

Permalink
drm/i915: Fix error handling for cursor/sprite plane create failure
Browse files Browse the repository at this point in the history
intel_cursor_plane_create() and intel_sprite_plane_create() return
an error pointer, so let's not mistakenly look for a NULL pointer.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
References: https://lists.freedesktop.org/archives/intel-gfx/2016-November/110690.html
Fixes: b079bd1 ("drm/i915: Bail if plane/crtc init fails")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1478550057-24864-5-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Ville Syrjälä committed Nov 8, 2016
1 parent 11df4d9 commit d2b2cbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -15289,14 +15289,14 @@ static int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
struct intel_plane *plane;

plane = intel_sprite_plane_create(dev_priv, pipe, sprite);
if (!plane) {
if (IS_ERR(plane)) {
ret = PTR_ERR(plane);
goto fail;
}
}

cursor = intel_cursor_plane_create(dev_priv, pipe);
if (!cursor) {
if (IS_ERR(cursor)) {
ret = PTR_ERR(cursor);
goto fail;
}
Expand Down

0 comments on commit d2b2cbc

Please sign in to comment.