]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
csiostor: fix an error code in csio_hw_init()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 14 Apr 2015 14:32:19 +0000 (17:32 +0300)
committerJames Bottomley <JBottomley@Odin.com>
Mon, 25 May 2015 15:46:26 +0000 (08:46 -0700)
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>
drivers/scsi/csiostor/csio_hw.c

index 2e66f34ebb79c9caba0b40027e412b17d85dcce6..622bdabc88941430f18ed65b0d70fd9fb0478b9b 100644 (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;
                }