public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] csiostor: fix an error code in csio_hw_init()
@ 2015-04-14 14:32 Dan Carpenter
  2015-04-16 12:22 ` Tomas Henzl
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-04-14 14:32 UTC (permalink / raw)
  To: James E.J. Bottomley
  Cc: David S. Miller, Hariprasad Shenai, Praveen Madhavan, linux-scsi,
	kernel-janitors

We should return -ENOMEM if kzalloc() fails here instead of returning
success.

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

diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
index 2e66f34..622bdab 100644
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers/scsi/csiostor/csio_hw.c
@@ -3928,6 +3928,7 @@ csio_hw_init(struct csio_hw *hw)
 
 		evt_entry = kzalloc(sizeof(struct csio_evt_msg), GFP_KERNEL);
 		if (!evt_entry) {
+			rv = -ENOMEM;
 			csio_err(hw, "Failed to initialize eventq");
 			goto err_evtq_cleanup;
 		}

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

end of thread, other threads:[~2015-04-16 12:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-14 14:32 [patch] csiostor: fix an error code in csio_hw_init() Dan Carpenter
2015-04-16 12:22 ` Tomas Henzl

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