1
0
Fork 0

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 <dan.carpenter@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
hifive-unleashed-5.1
Dan Carpenter 2015-04-14 17:32:19 +03:00 committed by James Bottomley
parent 0d143c69a3
commit ea47ebf15d
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}