Mike Christie 5e532c6771 scsi: spi: Fix sshdr use
[ Upstream commit 0b149cee836aa53989ea089af1cb9d90d7c6ac9e ]

If scsi_execute_cmd returns < 0, it doesn't initialize the sshdr, so we
shouldn't access the sshdr. If it returns 0, then the cmd executed
successfully, so there is no need to check the sshdr. This has us access
the sshdr when we get a return value > 0.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20231004210013.5601-7-michael.christie@oracle.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 5fe4af45db7988a0df3533d45aba085771654811)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-10-24 10:07:37 +00:00
..
2023-09-23 10:46:59 +02:00
2024-03-08 08:21:30 +00:00
2024-10-10 10:27:19 +00:00
2024-10-24 10:07:37 +00:00
2024-02-02 11:33:37 +00:00
2023-08-11 11:33:38 +02:00