From ea47ebf15d68d616cf0daef31e7f694d11b59f7f Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 14 Apr 2015 17:32:19 +0300 Subject: [PATCH] csiostor: fix an error code in csio_hw_init() We should return -ENOMEM if kzalloc() fails here instead of returning success. Signed-off-by: Dan Carpenter Reviewed-by: Tomas Henzl Signed-off-by: James Bottomley --- drivers/scsi/csiostor/csio_hw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c index 2e66f34ebb79..622bdabc8894 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; } -- 2.39.2