scsi: fnic: Fix error return in fnic_probe
Subsystems (2)
PATCH 1/1 scsi: fnic: Fix error return in fnic_probe
If mempool_create_slab_pool fails, return -ENOMEM.
Reported-by Hulk Robot <[email protected]>
Signed-off-by Kefeng Wang <[email protected]>
--- drivers/scsi/fnic/fnic_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/fnic/fnic_main.c +1 -0
@@ -740,6 +740,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)for (i =0 ; i <FNIC_IO_LOCKS ; i++)spin_lock_init (&fnic->io_req_lock[i]); + err = -ENOMEM ; fnic->io_req_pool =mempool_create_slab_pool (2 , fnic_io_req_cache);if (!fnic->io_req_pool) goto err_out_free_resources;
Signature · 1 line
2.26.2