diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2010-02-17 11:50:26 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 14:55:08 -0800 |
commit | 5d3034ab8faea229942e79d867d18722d5375b12 (patch) | |
tree | ea1716ac2b44d1f3f7b1b463d7c8661776c28899 /drivers | |
parent | 6d61ae9112960a2b3ed3360602dfb3bfd357954f (diff) |
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: Roel Kluin <roel.kluin@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/storage/shuttle_usbat.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c index b62a28814eb..bd3f415893d 100644 --- a/drivers/usb/storage/shuttle_usbat.c +++ b/drivers/usb/storage/shuttle_usbat.c @@ -1628,10 +1628,10 @@ static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us) return USB_STOR_TRANSPORT_ERROR; } - if ( (result = usbat_multiple_write(us, - registers, data, 7)) != USB_STOR_TRANSPORT_GOOD) { + result = usbat_multiple_write(us, registers, data, 7); + + if (result != USB_STOR_TRANSPORT_GOOD) return result; - } /* * Write the 12-byte command header. @@ -1643,12 +1643,11 @@ static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us) * AT SPEED 4 IS UNRELIABLE!!! */ - if ((result = usbat_write_block(us, - USBAT_ATA, srb->cmnd, 12, - (srb->cmnd[0]==GPCMD_BLANK ? 75 : 10), 0) != - USB_STOR_TRANSPORT_GOOD)) { + result = usbat_write_block(us, USBAT_ATA, srb->cmnd, 12, + srb->cmnd[0] == GPCMD_BLANK ? 75 : 10, 0); + + if (result != USB_STOR_TRANSPORT_GOOD) return result; - } /* If there is response data to be read in then do it here. */ |