mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-05-02 18:15:03 -04:00
scsi: core: Stop using DRIVER_ERROR
Return the actual error code in __scsi_execute() (which, according to the documentation, should have happened anyway). And audit all callers to cope with negative return values from __scsi_execute() and friends. [mkp: resolve conflict and return bool] Link: https://lore.kernel.org/r/20210427083046.31620-7-hare@suse.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
7e26e3ea02
commit
ced202f7bd
@@ -355,7 +355,7 @@ static void virtscsi_rescan_hotunplug(struct virtio_scsi *vscsi)
|
||||
if (result == 0 && inq_result[0] >> 5) {
|
||||
/* PQ indicates the LUN is not attached */
|
||||
scsi_remove_device(sdev);
|
||||
} else if (host_byte(result) == DID_BAD_TARGET) {
|
||||
} else if (result > 0 && host_byte(result) == DID_BAD_TARGET) {
|
||||
/*
|
||||
* If all LUNs of a virtio-scsi device are unplugged
|
||||
* it will respond with BAD TARGET on any INQUIRY
|
||||
|
||||
Reference in New Issue
Block a user