All of lore.kernel.org
 help / color / mirror / Atom feed
* [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 12:34 ` kbuild test robot
  1 sibling, 0 replies; 6+ 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] 6+ messages in thread

* [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 12:34 ` kbuild test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2017-03-14 12:34 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: David Airlie, Daniel Vetter, linux-kernel, dri-devel,
	virtualization, kbuild-all

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] 6+ messages in thread

* [PATCH] drm: virtio: fix eno.cocci warnings
@ 2017-03-14 12:34   ` kbuild test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2017-03-14 12:34 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Daniel Vetter, linux-kernel, dri-devel, virtualization, kbuild-all

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);
 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm: virtio: fix eno.cocci warnings
  2017-03-14 12:34   ` kbuild test robot
@ 2017-03-14 13:44     ` Gerd Hoffmann
  -1 siblings, 0 replies; 6+ 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] 6+ messages in thread

* Re: [PATCH] drm: virtio: fix eno.cocci warnings
  2017-03-14 12:34   ` kbuild test robot
  (?)
  (?)
@ 2017-03-14 13:44   ` Gerd Hoffmann
  -1 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2017-03-14 13:44 UTC (permalink / raw)
  To: kbuild test robot
  Cc: David Airlie, Daniel Vetter, linux-kernel, dri-devel,
	virtualization, kbuild-all

  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] 6+ messages in thread

* Re: [PATCH] drm: virtio: fix eno.cocci warnings
@ 2017-03-14 13:44     ` Gerd Hoffmann
  0 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2017-03-14 13:44 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Daniel Vetter, linux-kernel, dri-devel, virtualization, kbuild-all

  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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-14 13:45 UTC | newest]

Thread overview: 6+ 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 12:34   ` kbuild test robot
2017-03-14 13:44   ` Gerd Hoffmann
2017-03-14 13:44     ` Gerd Hoffmann
2017-03-14 13:44   ` Gerd Hoffmann
2017-03-14 12:34 ` kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.