All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [PATCH] BACKPORT: FROMLIST: virtio_video: fix eno.cocci warnings
Date: Tue, 07 Apr 2020 08:25:00 +0800	[thread overview]
Message-ID: <20200407002500.GA10664@196b62083e79> (raw)
In-Reply-To: <202004070853.FDawzKqC%lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

From: kbuild test robot <lkp@intel.com>

drivers/media/virtio/virtio_video_driver.c:103:5-11: ERROR: allocation function on line 102 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

Fixes: bbca48582a73 ("BACKPORT: FROMLIST: virtio_video: Add the Virtio Video V4L2 driver")
CC: Dmitry Sepp <dmitry.sepp@opensynergy.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
---

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head:   9d43dae2e392875899bd5387f80bfc6ee35b162f
commit: bbca48582a7342c1201691ce0eb08f1538376538 [34/57] BACKPORT: FROMLIST: virtio_video: Add the Virtio Video V4L2 driver

 virtio_video_driver.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/virtio/virtio_video_driver.c
+++ b/drivers/media/virtio/virtio_video_driver.c
@@ -100,7 +100,7 @@ static int virtio_video_query_cap_resp_b
 	int resp_size = vv->max_caps_len;
 
 	*resp_buf = kzalloc(vv->max_caps_len, GFP_KERNEL);
-	if (IS_ERR(*resp_buf)) {
+	if (!*resp_buf) {
 		ret = PTR_ERR(*resp_buf);
 		goto err;
 	}

  reply	other threads:[~2020-04-07  0:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07  0:24 [chrome-os:chromeos-5.4 34/57] drivers/media/virtio/virtio_video_driver.c:103:5-11: ERROR: allocation function on line 102 returns NULL not ERR_PTR on failure kbuild test robot
2020-04-07  0:25 ` kbuild test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-03-18 20:19 [chrome-os:chromeos-5.4 34/43] drivers/media/virtio/virtio_video_caps.c:298:5-11: ERROR: allocation function on line 297 " kbuild test robot
2020-03-18 20:19 ` [PATCH] BACKPORT: FROMLIST: virtio_video: fix eno.cocci warnings kbuild test robot
2020-03-18 20:19 ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200407002500.GA10664@196b62083e79 \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.