scsi: megaraid_sas: Fix crash after a double completion
authorTomas Henzl <thenzl@redhat.com>
Fri, 24 Mar 2023 15:01:34 +0000 (16:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:10:44 +0000 (12:10 +0200)
commit9526222c1a11a18a0e038a28c5597edde394dc8a
treec381354e6a6cd7a0d9a59c6758bdca0a648ddb9c
parent1da26860a348e898120deade0ee4813039caee7a
scsi: megaraid_sas: Fix crash after a double completion

[ Upstream commit 2309df27111a51734cb9240b4d3c25f2f3c6ab06 ]

When a physical disk is attached directly "without JBOD MAP support" (see
megasas_get_tm_devhandle()) then there is no real error handling in the
driver.  Return FAILED instead of SUCCESS.

Fixes: 18365b138508 ("megaraid_sas: Task management support")
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Link: https://lore.kernel.org/r/20230324150134.14696-1-thenzl@redhat.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/megaraid/megaraid_sas_fusion.c