Skip to content
Snippets Groups Projects
Commit ee20c69c authored by Dan Carpenter's avatar Dan Carpenter Committed by Alyssa Rosenzweig
Browse files

drm: adp: Fix NULL vs IS_ERR() check in adp_plane_new()


The __drmm_universal_plane_alloc() function doesn't return NULL, it
returns error pointers.  Update the check to match.

Fixes: 332122eb ("drm: adp: Add Apple Display Pipe driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Acked-by: default avatarSasha Finkelstein <fnkl.kernel@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/14a845e8-54d0-45f8-b8b9-927609d92ede@stanley.mountain


Signed-off-by: default avatarAlyssa Rosenzweig <alyssa@rosenzweig.io>
parent 914ee6e7
No related branches found
No related tags found
No related merge requests found
...@@ -232,9 +232,9 @@ static struct drm_plane *adp_plane_new(struct adp_drv_private *adp) ...@@ -232,9 +232,9 @@ static struct drm_plane *adp_plane_new(struct adp_drv_private *adp)
ALL_CRTCS, &adp_plane_funcs, ALL_CRTCS, &adp_plane_funcs,
plane_formats, ARRAY_SIZE(plane_formats), plane_formats, ARRAY_SIZE(plane_formats),
NULL, DRM_PLANE_TYPE_PRIMARY, "plane"); NULL, DRM_PLANE_TYPE_PRIMARY, "plane");
if (!plane) { if (IS_ERR(plane)) {
drm_err(drm, "failed to allocate plane"); drm_err(drm, "failed to allocate plane");
return ERR_PTR(-ENOMEM); return plane;
} }
drm_plane_helper_add(plane, &adp_plane_helper_funcs); drm_plane_helper_add(plane, &adp_plane_helper_funcs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment