提交 5d3034ab 编写于 作者: R Roel Kluin 提交者: Greg Kroah-Hartman

USB: storage: fix misplaced parenthesis

Due to a misplaced parenthesis the usbat_write_block() return value was not
stored, but a boolean. USB_STOR_TRANSPORT_NO_SENSE and USB_STOR_TRANSPORT_ERROR
were returned as USB_STOR_TRANSPORT_FAILED.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 6d61ae91
...@@ -1628,10 +1628,10 @@ static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us) ...@@ -1628,10 +1628,10 @@ static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us)
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
if ( (result = usbat_multiple_write(us, result = usbat_multiple_write(us, registers, data, 7);
registers, data, 7)) != USB_STOR_TRANSPORT_GOOD) {
if (result != USB_STOR_TRANSPORT_GOOD)
return result; return result;
}
/* /*
* Write the 12-byte command header. * Write the 12-byte command header.
...@@ -1643,12 +1643,11 @@ static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us) ...@@ -1643,12 +1643,11 @@ static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us)
* AT SPEED 4 IS UNRELIABLE!!! * AT SPEED 4 IS UNRELIABLE!!!
*/ */
if ((result = usbat_write_block(us, result = usbat_write_block(us, USBAT_ATA, srb->cmnd, 12,
USBAT_ATA, srb->cmnd, 12, srb->cmnd[0] == GPCMD_BLANK ? 75 : 10, 0);
(srb->cmnd[0]==GPCMD_BLANK ? 75 : 10), 0) !=
USB_STOR_TRANSPORT_GOOD)) { if (result != USB_STOR_TRANSPORT_GOOD)
return result; return result;
}
/* If there is response data to be read in then do it here. */ /* If there is response data to be read in then do it here. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册