> > @@ -8669,6 +8669,7 @@ static int ufshcd_set_dev_pwr_mode(struct ufs_hba > *hba, > > pwr_mode, ret); > > if (ret > 0 && scsi_sense_valid(&sshdr)) > > scsi_print_sense_hdr(sdp, NULL, &sshdr); > > + ret = -EIO; > > } > > > > if (!ret) > > Shouldn't "ret = -EIO" only be executed if ret > 0? Additionally, please > update the documentation of ufshcd_set_dev_pwr_mode(). I'm referring to > the following comment: "Returns non-zero if failed to set the requested > power mode". > > Thanks, > > Bart. scsi_execute returns cmd->result(int type) but I think there is no case that the valaue is negative because all values defined for its most significant byte, i.e. driver byte, are smaller than 0x80. And I understand the 'ret > 0' presents that something wrong happens during the process. So I'm not sure if 'ret = -EIO;' should be executed under 'ret > 0'. -- #define DRIVER_BUSY 0x01 #define DRIVER_SOFT 0x02 And for the comment, I got it. Thanks Kiwoong