scsi: qla2xxx: fix a potential NULL pointer dereference
authorAllen Pais <allen.pais@oracle.com>
Wed, 18 Sep 2019 16:36:58 +0000 (22:06 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Feb 2020 14:42:15 +0000 (15:42 +0100)
commit3a21c5b627a2f8e1ca274a155267f0c952c8de0c
treee4334680f03ac9ca73fb6b389ce167dcda88d796
parent66ada407dd6a58dbb4e51ea4489af009e886a31b
scsi: qla2xxx: fix a potential NULL pointer dereference

commit 35a79a63517981a8aea395497c548776347deda8 upstream.

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>
[Ajay: Rewrote this patch for v4.9.y, as 4.9.y codebase is different from mainline]
Signed-off-by: Ajay Kaher <akaher@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_os.c