From: Fengguang Wu <fengguang.wu@intel.com>
To: kernel-janitors@vger.kernel.org
Subject: [target:for-linus 1/1] drivers/vhost/tcm_vhost.c:537:23-29: ERROR: allocation function on line 533 r
Date: Sat, 28 Jul 2012 10:20:33 +0000 [thread overview]
Message-ID: <20120728102033.GA10759@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 865 bytes --]
Hi Nicholas,
There are new coccinelle warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-linus
head: fd682824bcdab8cbb3d078f9f59ba531e3e41484
commit: fd682824bcdab8cbb3d078f9f59ba531e3e41484 [1/1] tcm_vhost: Initial merge for vhost level target fabric driver
All coccinelle warnings:
drivers/vhost/tcm_vhost.c:537:23-29: ERROR: allocation function on line 533 returns NULL not ERR_PTR on failure
vim +537 drivers/vhost/tcm_vhost.c
534 if (!sg)
535 return -ENOMEM;
536 pr_debug("%s sg %p sgl_count %u is_err %ld\n", __func__,
> 537 sg, sgl_count, IS_ERR(sg));
538 sg_init_table(sg, sgl_count);
539
540 tv_cmd->tvc_sgl = sg;
---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu <wfg@linux.intel.com> Intel Corporation
[-- Attachment #2: 7750-7768.patch --]
[-- Type: text/x-diff, Size: 477 bytes --]
Generated by: null/eno.cocci
The various basic memory allocation functions don't return ERR_PTR
--- /c/kernel-tests/src/linux/drivers/vhost/tcm_vhost.c
+++ /tmp/cocci-output-16473-2fe139-tcm_vhost.c
@@ -534,7 +534,7 @@ static int vhost_scsi_map_iov_to_sgl(str
if (!sg)
return -ENOMEM;
pr_debug("%s sg %p sgl_count %u is_err %ld\n", __func__,
- sg, sgl_count, IS_ERR(sg));
+ sg, sgl_count, !sg);
sg_init_table(sg, sgl_count);
tv_cmd->tvc_sgl = sg;
next reply other threads:[~2012-07-28 10:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-28 10:20 Fengguang Wu [this message]
2012-07-30 22:24 ` [target:for-linus 1/1] drivers/vhost/tcm_vhost.c:537:23-29: ERROR: allocation function on line 5 Nicholas A. Bellinger
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=20120728102033.GA10759@localhost \
--to=fengguang.wu@intel.com \
--cc=kernel-janitors@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox