mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
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: 332122eba6 ("drm: adp: Add Apple Display Pipe driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/14a845e8-54d0-45f8-b8b9-927609d92ede@stanley.mountain
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
914ee6e730
commit
ee20c69c78
|
|
@ -232,9 +232,9 @@ static struct drm_plane *adp_plane_new(struct adp_drv_private *adp)
|
|||
ALL_CRTCS, &adp_plane_funcs,
|
||||
plane_formats, ARRAY_SIZE(plane_formats),
|
||||
NULL, DRM_PLANE_TYPE_PRIMARY, "plane");
|
||||
if (!plane) {
|
||||
if (IS_ERR(plane)) {
|
||||
drm_err(drm, "failed to allocate plane");
|
||||
return ERR_PTR(-ENOMEM);
|
||||
return plane;
|
||||
}
|
||||
|
||||
drm_plane_helper_add(plane, &adp_plane_helper_funcs);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user