From: Dan Carpenter Date: Tue, 10 Aug 2021 11:46:13 +0300 Subject: scsi: smartpqi: Fix an error code in pqi_get_raid_map() Git-commit: d1f6581a6796c4e9fd8a4a24e8b77463d18f0df1 Patch-mainline: v5.15-rc1 References: git-fixes Return -EINVAL on failure instead of success. [lduncan: refreshed to apply] Link: https://lore.kernel.org/r/20210810084613.GB23810@kili Fixes: a91aaae0243b ("scsi: smartpqi: allow for larger raid maps") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen Acked-by: Lee Duncan --- drivers/scsi/smartpqi/smartpqi_init.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -1323,6 +1323,7 @@ static int pqi_get_raid_map(struct pqi_c "requested %u bytes, received %u bytes\n", raid_map_size, get_unaligned_le32(&raid_map->structure_size)); + rc = -EINVAL; goto error; } }