lkml.org 
[lkml]   [2020]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Xen-devel] [PATCH] drm/xen: fix passing zero to 'PTR_ERR' warning
From
Date
On 3/30/20 12:59, Ding Xiang wrote:
> 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>
> ---
> drivers/gpu/drm/xen/xen_drm_front.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c
> index 4be49c1..3741420 100644
> --- a/drivers/gpu/drm/xen/xen_drm_front.c
> +++ b/drivers/gpu/drm/xen/xen_drm_front.c
> @@ -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;
> }
>

\
 
 \ /
  Last update: 2020-03-31 16:51    [W:0.045 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site