mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
ata: libata-sata: simplify ata_sas_queuecmd()
Change ata_sas_queuecmd() to return early the result of __ata_scsi_queuecmd() and remove the rc local variable. This simplifies the code without any functional change. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de>
This commit is contained in:
parent
6158e34e59
commit
a21b4040b3
|
|
@ -1378,15 +1378,13 @@ EXPORT_SYMBOL_GPL(ata_sas_sdev_configure);
|
|||
|
||||
int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
if (likely(ata_dev_enabled(ap->link.device)))
|
||||
rc = __ata_scsi_queuecmd(cmd, ap->link.device);
|
||||
else {
|
||||
cmd->result = (DID_BAD_TARGET << 16);
|
||||
scsi_done(cmd);
|
||||
}
|
||||
return rc;
|
||||
return __ata_scsi_queuecmd(cmd, ap->link.device);
|
||||
|
||||
cmd->result = (DID_BAD_TARGET << 16);
|
||||
scsi_done(cmd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ata_sas_queuecmd);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user