diff options
Diffstat (limited to 'drivers/scsi/ch.c')
-rw-r--r-- | drivers/scsi/ch.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index 9b89c26ccfdb..fc7197abfcdf 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c @@ -198,8 +198,9 @@ 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 (driver_byte(result) == DRIVER_SENSE) { + if (result < 0) + return result; + if (scsi_sense_valid(&sshdr)) { if (debug) scsi_print_sense_hdr(ch->device, ch->name, &sshdr); errno = ch_find_errno(&sshdr); |