[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:
parent
683aa4012f
commit
5bbc53f4cf
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user