Skip to content

Commit 424f727

Browse files
bjking1martinkpetersen
authored andcommitted
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>
1 parent b0e17a9 commit 424f727

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/ses.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code,
9999

100100
ret = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, bufflen,
101101
NULL, SES_TIMEOUT, SES_RETRIES, NULL);
102-
if (unlikely(!ret))
102+
if (unlikely(ret))
103103
return ret;
104104

105105
recv_page_code = ((unsigned char *)buf)[0];

0 commit comments

Comments
 (0)