OSDN Git Service

Merge tag 'block-5.14-2021-07-08' of git://git.kernel.dk/linux-block
[uclinux-h8/linux.git] / drivers / scsi / st.c
index 86c951c..c6f1454 100644 (file)
@@ -390,8 +390,8 @@ static int st_chk_result(struct scsi_tape *STp, struct st_request * SRpnt)
        if (!debugging) { /* Abnormal conditions for tape */
                if (!cmdstatp->have_sense)
                        st_printk(KERN_WARNING, STp,
-                              "Error %x (driver bt 0x%x, host bt 0x%x).\n",
-                              result, driver_byte(result), host_byte(result));
+                              "Error %x (driver bt 0, host bt 0x%x).\n",
+                              result, host_byte(result));
                else if (cmdstatp->have_sense &&
                         scode != NO_SENSE &&
                         scode != RECOVERED_ERROR &&
@@ -551,7 +551,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd,
                        data_direction == DMA_TO_DEVICE ?
                        REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
        if (IS_ERR(req))
-               return DRIVER_ERROR << 24;
+               return PTR_ERR(req);
        rq = scsi_req(req);
        req->rq_flags |= RQF_QUIET;
 
@@ -562,7 +562,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd,
                                      GFP_KERNEL);
                if (err) {
                        blk_put_request(req);
-                       return DRIVER_ERROR << 24;
+                       return err;
                }
        }