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 <fengguang...@intel.com> Signed-off-by: Hannes Reinecke <h...@suse.de> --- drivers/scsi/scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index e5d5f59..4acb287 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -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) -- 1.7.12.4 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html