All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: keith.busch@intel.com, axboe@kernel.dk
Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
	sagi@lightbits.io, ming.l@ssi.samsung.com,
	kbuild test robot <lkp@intel.com>,
	Fengguang Wu <fengguang.wu@intel.com>
Subject: [PATCH 08/11] nvmet: fix eno.cocci warnings
Date: Wed,  8 Jun 2016 14:31:03 +0200	[thread overview]
Message-ID: <1465389066-19119-9-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1465389066-19119-1-git-send-email-hch@lst.de>

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

drivers/nvme/target/configfs.c:796:5-11: ERROR: allocation function on line 795 returns NULL not ERR_PTR on failure
drivers/nvme/target/configfs.c:739:5-11: ERROR: allocation function on line 738 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

CC: Christoph Hellwig <hch@lst.de>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/nvme/target/configfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
index aebe646..9bed302 100644
--- a/drivers/nvme/target/configfs.c
+++ b/drivers/nvme/target/configfs.c
@@ -736,7 +736,7 @@ static struct config_group *nvmet_referral_make(
 	struct nvmet_port *port;
 
 	port = kzalloc(sizeof(*port), GFP_KERNEL);
-	if (IS_ERR(port))
+	if (!port)
 		return ERR_CAST(port);
 
 	INIT_LIST_HEAD(&port->entry);
@@ -793,7 +793,7 @@ static struct config_group *nvmet_ports_make(struct config_group *group,
 		return ERR_PTR(-EINVAL);
 
 	port = kzalloc(sizeof(*port), GFP_KERNEL);
-	if (IS_ERR(port))
+	if (!port)
 		return ERR_CAST(port);
 
 	INIT_LIST_HEAD(&port->entry);
-- 
2.1.4

WARNING: multiple messages have this Message-ID (diff)
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 08/11] nvmet: fix eno.cocci warnings
Date: Wed,  8 Jun 2016 14:31:03 +0200	[thread overview]
Message-ID: <1465389066-19119-9-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1465389066-19119-1-git-send-email-hch@lst.de>

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

drivers/nvme/target/configfs.c:796:5-11: ERROR: allocation function on line 795 returns NULL not ERR_PTR on failure
drivers/nvme/target/configfs.c:739:5-11: ERROR: allocation function on line 738 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

CC: Christoph Hellwig <hch at lst.de>
Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/target/configfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
index aebe646..9bed302 100644
--- a/drivers/nvme/target/configfs.c
+++ b/drivers/nvme/target/configfs.c
@@ -736,7 +736,7 @@ static struct config_group *nvmet_referral_make(
 	struct nvmet_port *port;
 
 	port = kzalloc(sizeof(*port), GFP_KERNEL);
-	if (IS_ERR(port))
+	if (!port)
 		return ERR_CAST(port);
 
 	INIT_LIST_HEAD(&port->entry);
@@ -793,7 +793,7 @@ static struct config_group *nvmet_ports_make(struct config_group *group,
 		return ERR_PTR(-EINVAL);
 
 	port = kzalloc(sizeof(*port), GFP_KERNEL);
-	if (IS_ERR(port))
+	if (!port)
 		return ERR_CAST(port);
 
 	INIT_LIST_HEAD(&port->entry);
-- 
2.1.4

  parent reply	other threads:[~2016-06-08 12:31 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08 12:30 NVMe over Fabrics: updates for req_op changes and misc fixes Christoph Hellwig
2016-06-08 12:30 ` Christoph Hellwig
2016-06-08 12:30 ` [PATCH 01/11] Revert "blk-mq: add blk_mq_alloc_request_hctx" Christoph Hellwig
2016-06-08 12:30   ` Christoph Hellwig
2016-06-08 13:58   ` Jeff Moyer
2016-06-08 13:58     ` Jeff Moyer
2016-06-08 14:10     ` Christoph Hellwig
2016-06-08 14:10       ` Christoph Hellwig
2016-06-08 14:13       ` Jeff Moyer
2016-06-08 14:13         ` Jeff Moyer
2016-06-08 12:30 ` [PATCH 02/11] blk-mq: add blk_mq_alloc_request_hctx Christoph Hellwig
2016-06-08 12:30   ` Christoph Hellwig
2016-06-08 13:43   ` Sagi Grimberg
2016-06-08 13:43     ` Sagi Grimberg
2016-06-08 12:30 ` [PATCH 03/11] nvme_rdma: update for req_op changes Christoph Hellwig
2016-06-08 12:30   ` Christoph Hellwig
2016-06-08 13:44   ` Sagi Grimberg
2016-06-08 13:44     ` Sagi Grimberg
2016-06-08 22:03   ` Ming Lin
2016-06-08 22:03     ` Ming Lin
2016-06-08 12:30 ` [PATCH 04/11] nvmet: " Christoph Hellwig
2016-06-08 12:30   ` Christoph Hellwig
2016-06-08 13:44   ` Sagi Grimberg
2016-06-08 13:44     ` Sagi Grimberg
2016-06-14 14:27   ` Christoph Hellwig
2016-06-14 14:27     ` Christoph Hellwig
2016-06-08 12:31 ` [PATCH 05/11] nvme-loop: set SGL flag on AER Christoph Hellwig
2016-06-08 12:31   ` Christoph Hellwig
2016-06-08 12:31 ` [PATCH 06/11] nvme-rdma: " Christoph Hellwig
2016-06-08 12:31   ` Christoph Hellwig
2016-06-08 12:31 ` [PATCH 07/11] nvmet: fix 64-bit division in nvmet_set_features Christoph Hellwig
2016-06-08 12:31   ` Christoph Hellwig
2016-06-08 13:53   ` Sagi Grimberg
2016-06-08 13:53     ` Sagi Grimberg
2016-06-08 12:31 ` Christoph Hellwig [this message]
2016-06-08 12:31   ` [PATCH 08/11] nvmet: fix eno.cocci warnings Christoph Hellwig
2016-06-08 22:09   ` Ming Lin
2016-06-08 22:09     ` Ming Lin
2016-06-08 12:31 ` [PATCH 09/11] nvmet-rdma: check for a valid adrfam Christoph Hellwig
2016-06-08 12:31   ` Christoph Hellwig
2016-06-08 12:31 ` [PATCH 10/11] nvme: keep alive should use any queue Christoph Hellwig
2016-06-08 12:31   ` Christoph Hellwig
2016-06-08 13:54   ` Sagi Grimberg
2016-06-08 13:54     ` Sagi Grimberg
2016-06-08 12:31 ` [PATCH 11/11] nvme-fabrics: pass non-blocking flag to connect request allocation Christoph Hellwig
2016-06-08 12:31   ` Christoph Hellwig
2016-06-08 13:55   ` Sagi Grimberg
2016-06-08 13:55     ` Sagi Grimberg
2016-06-08 14:09     ` Christoph Hellwig
2016-06-08 14:09       ` Christoph Hellwig
2016-06-08 22:21 ` NVMe over Fabrics: updates for req_op changes and misc fixes Ming Lin
2016-06-08 22:21   ` Ming Lin

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=1465389066-19119-9-git-send-email-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=fengguang.wu@intel.com \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=ming.l@ssi.samsung.com \
    --cc=sagi@lightbits.io \
    /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.