Skip to contentSkip to conversation

scsi: smartpqi: Fix an error code in pqi_get_raid_map()

PATCH Applied Dan Carpenter 2 participants 2 messages Aug 10, 2021 – Aug 16, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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")
---
 drivers/scsi/smartpqi/smartpqi_init.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/smartpqi/smartpqi_init.c +1 -0
index c1f0f8da9fe2..7ccf8e704486 100644
@@ -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
#1 lore raw

Dan,

Quoted 1 line

Return -EINVAL on failure instead of success.

Applied to 5.15/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering