qla2x00t-32gbit: Fix a potential NULL pointer dereference

alloc_workqueue is not checked for errors and as a result a potential
NULL dereference could occur.

Link: https://lore.kernel.org/r/1568824618-4366-1-git-send-email-allen.pais@oracle.com
Signed-off-by: Allen Pais <allen.pais@oracle.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 35a79a63517981a8aea395497c548776347deda8 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8647 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-11-03 00:25:41 +00:00
parent 56f22a2bbf
commit cecdb41bb9

View File

@@ -3274,6 +3274,10 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
req->req_q_in, req->req_q_out, rsp->rsp_q_in, rsp->rsp_q_out);
ha->wq = alloc_workqueue("qla2xxx_wq", 0, 0);
if (unlikely(!ha->wq)) {
ret = -ENOMEM;
goto probe_failed;
}
if (ha->isp_ops->initialize_adapter(base_vha)) {
ql_log(ql_log_fatal, base_vha, 0x00d6,