Skip to contentSkip to conversation

scsi: fixup return code in scsi_vpd_inquiry()

PATCH New Hannes Reinecke 1 participant 1 message Mar 21, 2014 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: fixup return code in scsi_vpd_inquiry()

scsi_execute_req() will return a SCSI error code on failure, which needs to be converted in the standard error codes.

---
 drivers/scsi/scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi.c +1 -1
index e5d5f59..4acb287 100644
@@ -952,7 +952,7 @@ static int scsi_vpd_inquiry(struct scsi_device *sdev, unsigned char *buffer,
 	result = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buffer,
 				  len, NULL, 30 * HZ, 3, NULL);
 	if (result)
-		return result;
+		return -EIO;
 
 	/* Sanity check that we got the page back that we asked for */
 	if (buffer[1] != page)
Signature · 1 line
1.7.12.4