From: Tejun Heo Date: Fri, 31 Mar 2006 16:38:17 +0000 (+0900) Subject: [PATCH] libata: fix ata_set_mode() return value X-Git-Tag: firefly_0821_release~35456^2~166 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5bbc53f4cfd28bf1d0e476ed23bc3a094eff718a;p=firefly-linux-kernel-4.4.55.git [PATCH] libata: fix ata_set_mode() return value Make ata_set_mode() return correct error value when ata_dev_set_mode() fails. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index e63c1ff1e102..8def7a5e436a 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1856,7 +1856,8 @@ static void ata_set_mode(struct ata_port *ap) if (!ata_dev_present(dev)) continue; - if (ata_dev_set_mode(ap, dev)) + rc = ata_dev_set_mode(ap, dev); + if (rc) goto err_out; }