diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-08-10 11:46:13 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-08-16 13:21:44 -0400 |
commit | d1f6581a6796c4e9fd8a4a24e8b77463d18f0df1 (patch) | |
tree | d458fcc3fcc6c921a7976f837d40841d265cda29 /drivers/scsi/smartpqi | |
parent | 92cc94adfce4683d0b421cbf59013703368aaeb9 (diff) | |
download | lwn-d1f6581a6796c4e9fd8a4a24e8b77463d18f0df1.tar.gz lwn-d1f6581a6796c4e9fd8a4a24e8b77463d18f0df1.zip |
scsi: smartpqi: Fix an error code in pqi_get_raid_map()
Return -EINVAL on failure instead of success.
Link: https://lore.kernel.org/r/20210810084613.GB23810@kili
Fixes: a91aaae0243b ("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>
Diffstat (limited to 'drivers/scsi/smartpqi')
-rw-r--r-- | drivers/scsi/smartpqi/smartpqi_init.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index d95498ff136a..fb31fb6b0979 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -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; } } |