scsi: smartpqi: Fix an error code in pqi_get_raid_map()
PATCH 1/1 scsi: smartpqi: Fix an error code in pqi_get_raid_map()
Return -EINVAL on failure instead of success.
Fixes a91aaae0243b ("scsi: smartpqi: allow for larger raid maps")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/scsi/smartpqi/smartpqi_init.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/smartpqi/smartpqi_init.c +1 -0
@@ -1322,6 +1322,7 @@ static int pqi_get_raid_map(struct pqi_ctrl_info *ctrl_info,"requested %u bytes, received %u bytes\n" , raid_map_size, get_unaligned_le32(&raid_map->structure_size)); + rc = -EINVAL ; goto error; } }
Signature · 1 line
2.20.1
Martin K. Petersen
AppliedDan,
Quoted 1 line
Return
-EINVALon failure instead of success.
Applied to 5.15/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering