From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5411504053911115877==" MIME-Version: 1.0 From: kbuild test robot 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 Message-ID: <20200407002500.GA10664@196b62083e79> In-Reply-To: <202004070853.FDawzKqC%lkp@intel.com> List-Id: --===============5411504053911115877== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kbuild test robot drivers/media/virtio/virtio_video_driver.c:103:5-11: ERROR: allocation func= tion 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 Vide= o V4L2 driver") CC: Dmitry Sepp Signed-off-by: kbuild test robot --- tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chr= omeos-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 =3D vv->max_caps_len; = *resp_buf =3D kzalloc(vv->max_caps_len, GFP_KERNEL); - if (IS_ERR(*resp_buf)) { + if (!*resp_buf) { ret =3D PTR_ERR(*resp_buf); goto err; } --===============5411504053911115877==--