* [PATCH] drm: virtio: fix eno.cocci warnings [not found] <201703142048.yRK7v1yg%fengguang.wu@intel.com> @ 2017-03-14 12:34 ` kbuild test robot 2017-03-14 13:44 ` Gerd Hoffmann 0 siblings, 1 reply; 2+ messages in thread From: kbuild test robot @ 2017-03-14 12:34 UTC (permalink / raw) To: Gerd Hoffmann Cc: kbuild-all, Daniel Vetter, David Airlie, dri-devel, virtualization, linux-kernel 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@intel.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); ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm: virtio: fix eno.cocci warnings 2017-03-14 12:34 ` [PATCH] drm: virtio: fix eno.cocci warnings kbuild test robot @ 2017-03-14 13:44 ` Gerd Hoffmann 0 siblings, 0 replies; 2+ messages in thread From: Gerd Hoffmann @ 2017-03-14 13:44 UTC (permalink / raw) To: kbuild test robot Cc: kbuild-all, Daniel Vetter, David Airlie, dri-devel, virtualization, linux-kernel Hi, > vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL); > - if (IS_ERR(vbuf)) > + if (!vbuf) > return ERR_CAST(vbuf); Well, ERR_CAST(vbuf) isn't correct either ... correct fix has been committed to drm-misc-next today and should show up in linux-next shortly. cheers, Gerd ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-14 13:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201703142048.yRK7v1yg%fengguang.wu@intel.com>
2017-03-14 12:34 ` [PATCH] drm: virtio: fix eno.cocci warnings kbuild test robot
2017-03-14 13:44 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox