Skip to content

Commit

Permalink
drm/xen: fix passing zero to 'PTR_ERR' warning
Browse files Browse the repository at this point in the history
[ Upstream commit 4c1cb04 ]

Fix a static code checker warning:
    drivers/gpu/drm/xen/xen_drm_front.c:404 xen_drm_drv_dumb_create()
    warn: passing zero to 'PTR_ERR'

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1585562347-30214-1-git-send-email-dingxiang@cmss.chinamobile.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Ding Xiang authored and gregkh committed Sep 3, 2020
1 parent fe376f1 commit 02611bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/xen/xen_drm_front.c
Expand Up @@ -401,7 +401,7 @@ static int xen_drm_drv_dumb_create(struct drm_file *filp,

obj = xen_drm_front_gem_create(dev, args->size);
if (IS_ERR_OR_NULL(obj)) {
ret = PTR_ERR(obj);
ret = PTR_ERR_OR_ZERO(obj);
goto fail;
}

Expand Down

0 comments on commit 02611bc

Please sign in to comment.