All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: smartpqi: Fix an error code in pqi_get_raid_map()
@ 2021-08-10  8:46 Dan Carpenter
  2021-08-16 17:21 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-08-10  8:46 UTC (permalink / raw)
  To: Don Brace
  Cc: James E.J. Bottomley, Martin K. Petersen, Dave Carroll,
	Mahesh Rajashekhara, Murthy Bhat, storagedev, linux-scsi,
	kernel-janitors

Return -EINVAL on failure instead of success.

Fixes: a91aaae0243b ("scsi: smartpqi: allow for larger raid maps")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/scsi/smartpqi/smartpqi_init.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index c1f0f8da9fe2..7ccf8e704486 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;
 		}
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: smartpqi: Fix an error code in pqi_get_raid_map()
  2021-08-10  8:46 [PATCH] scsi: smartpqi: Fix an error code in pqi_get_raid_map() Dan Carpenter
@ 2021-08-16 17:21 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-08-16 17:21 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Don Brace, James E.J. Bottomley, Martin K. Petersen,
	Dave Carroll, Mahesh Rajashekhara, Murthy Bhat, storagedev,
	linux-scsi, kernel-janitors


Dan,

> Return -EINVAL on failure instead of success.

Applied to 5.15/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-16 17:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10  8:46 [PATCH] scsi: smartpqi: Fix an error code in pqi_get_raid_map() Dan Carpenter
2021-08-16 17:21 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.