[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 <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Tejun Heo 2006-04-01 01:38:17 +09:00 committed by Jeff Garzik
parent 683aa4012f
commit 5bbc53f4cf

View File

@ -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;
}