public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] sbp-target: checking for NULL instead of IS_ERR()
@ 2012-04-17  6:29 Dan Carpenter
  2012-04-17  7:59 ` Chris Boot
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Dan Carpenter @ 2012-04-17  6:29 UTC (permalink / raw)
  To: kernel-janitors

target_fabric_configfs_init() never returns NULL, it only returns
ERR_PTRs.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
index 37c6098..d605971 100644
--- a/drivers/target/sbp/sbp_target.c
+++ b/drivers/target/sbp/sbp_target.c
@@ -2559,9 +2559,9 @@ static int sbp_register_configfs(void)
 	int ret;
 
 	fabric = target_fabric_configfs_init(THIS_MODULE, "sbp");
-	if (!fabric) {
+	if (IS_ERR(fabric)) {
 		pr_err("target_fabric_configfs_init() failed\n");
-		return -ENOMEM;
+		return PTR_ERR(fabric);
 	}
 
 	fabric->tf_ops = sbp_ops;

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

end of thread, other threads:[~2016-03-11  4:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17  6:29 [patch] sbp-target: checking for NULL instead of IS_ERR() Dan Carpenter
2012-04-17  7:59 ` Chris Boot
2012-04-18  7:11 ` Nicholas A. Bellinger
2016-03-02 10:09 ` [patch] sbp-target: checking for NULL instead of IS_ERR Dan Carpenter
2016-03-05  7:33   ` Nicholas A. Bellinger
2016-03-05  8:45     ` Chris Boot
2016-03-05  9:33       ` Nicholas A. Bellinger
2016-03-10 20:56         ` Chris Boot
2016-03-10 21:52           ` Chris Boot
2016-03-10 22:58             ` Chris Boot
2016-03-11  4:33               ` Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox