[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170314123451.GA51889@lkp-sb04.lkp.intel.com>
Date: Tue, 14 Mar 2017 20:34:51 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: Gerd Hoffmann <kraxel@...hat.com>
Cc: kbuild-all@...org, Daniel Vetter <daniel.vetter@...ll.ch>,
David Airlie <airlied@...ux.ie>,
dri-devel@...ts.freedesktop.org,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] drm: virtio: fix eno.cocci warnings
drivers/gpu/drm/virtio/virtgpu_vq.c:100:5-11: ERROR: allocation function on line 99 returns NULL not ERR_PTR on failure
The various basic memory allocation functions don't return ERR_PTR
Generated by: scripts/coccinelle/null/eno.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
virtgpu_vq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -97,7 +97,7 @@ virtio_gpu_get_vbuf(struct virtio_gpu_de
struct virtio_gpu_vbuffer *vbuf;
vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL);
- if (IS_ERR(vbuf))
+ if (!vbuf)
return ERR_CAST(vbuf);
memset(vbuf, 0, VBUFFER_SIZE);
Powered by blists - more mailing lists