mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
scsi: smartpqi: Fix an error code in pqi_get_raid_map()
[ Upstream commitd1f6581a67] Return -EINVAL on failure instead of success. Link: https://lore.kernel.org/r/20210810084613.GB23810@kili Fixes:a91aaae024("scsi: smartpqi: allow for larger raid maps") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
41066433be
commit
782c401784
|
|
@ -1207,6 +1207,7 @@ static int pqi_get_raid_map(struct pqi_ctrl_info *ctrl_info,
|
||||||
"Requested %d bytes, received %d bytes",
|
"Requested %d bytes, received %d bytes",
|
||||||
raid_map_size,
|
raid_map_size,
|
||||||
get_unaligned_le32(&raid_map->structure_size));
|
get_unaligned_le32(&raid_map->structure_size));
|
||||||
|
rc = -EINVAL;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user