]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: qla4xxx: Prevent a potential error pointer dereference
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 13 Aug 2025 05:49:08 +0000 (08:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:26:17 +0000 (16:26 +0200)
commit46288d12d1c30d08fbeffd05abc079f57a43a2d4
tree6adecd8a5bd8c5c88372f18b52f8a7b6d699720b
parent43e281fde5e76a866a4d10780c35023f16c0e432
scsi: qla4xxx: Prevent a potential error pointer dereference

[ Upstream commit 9dcf111dd3e7ed5fce82bb108e3a3fc001c07225 ]

The qla4xxx_get_ep_fwdb() function is supposed to return NULL on error,
but qla4xxx_ep_connect() returns error pointers.  Propagating the error
pointers will lead to an Oops in the caller, so change the error pointers
to NULL.

Fixes: 13483730a13b ("[SCSI] qla4xxx: fix flash/ddb support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/aJwnVKS9tHsw1tEu@stanley.mountain
Reviewed-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/qla4xxx/ql4_os.c