mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
scsi: qla2xxx: 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/[email protected] Signed-off-by: Allen Pais <[email protected]> Reviewed-by: Martin Wilck <[email protected]> Acked-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
parent
b23f330d51
commit
35a79a6351
1 changed files with 4 additions and 0 deletions
|
|
@ -3224,6 +3224,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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue