summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ch.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ch.c')
-rw-r--r--drivers/scsi/ch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 9b89c26ccfdb..d5990f6fb313 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -198,7 +198,8 @@ ch_do_scsi(scsi_changer *ch, unsigned char *cmd, int cmd_len,
result = scsi_execute_req(ch->device, cmd, direction, buffer,
buflength, &sshdr, timeout * HZ,
MAX_RETRIES, NULL);
-
+ if (result < 0)
+ return result;
if (driver_byte(result) == DRIVER_SENSE) {
if (debug)
scsi_print_sense_hdr(ch->device, ch->name, &sshdr);