scsi: fixup return code in scsi_vpd_inquiry()
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.
Reported-by Fengguang We <[email protected]>
Signed-off-by Hannes Reinecke <[email protected]>
--- drivers/scsi/scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi.c +1 -1
@@ -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