RE: [PATCH v1] scsi: ufs: use an generic error code in ufshcd_set_dev_pwr_mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I think that scsi_execute() can return a negative value. From
> __scsi_execute():
> 
> 	req = scsi_alloc_request(sdev->request_queue,
> 			data_direction == DMA_TO_DEVICE ?
> 			REQ_OP_DRV_OUT : REQ_OP_DRV_IN,
> 			rq_flags & RQF_PM ? BLK_MQ_REQ_PM : 0);
> 	if (IS_ERR(req))
> 		return PTR_ERR(req);
> 
> As you probably know PTR_ERR() returns a negative error code if IS_ERR()
> returns true.

Right, Thanks.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux