summaryrefslogtreecommitdiff
path: root/drivers/scsi/ses.c
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2017-08-01 13:45:36 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-08 11:49:52 -0400
commit424f727b94132a4193af401dd823c44612d1d59f (patch)
treea424f444cb1ff2352e27d1f0f83ee8276b511d4f /drivers/scsi/ses.c
parentb0e17a9b0df29590c45dfb296f541270a5941f41 (diff)
scsi: ses: Fix wrong page error
If a SES device returns an error on a requested diagnostic page, we are currently printing an error indicating the wrong page was received. Fix this up to simply return a failure and only check the returned page when the diagnostic page buffer was populated by the device. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ses.c')
-rw-r--r--drivers/scsi/ses.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index f1cdf32d7514..8927f9f54ad9 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -99,7 +99,7 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code,
ret = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, bufflen,
NULL, SES_TIMEOUT, SES_RETRIES, NULL);
- if (unlikely(!ret))
+ if (unlikely(ret))
return ret;
recv_page_code = ((unsigned char *)buf)[0];