Commit 5bbc53f4 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

[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: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 683aa401
...@@ -1856,7 +1856,8 @@ static void ata_set_mode(struct ata_port *ap) ...@@ -1856,7 +1856,8 @@ static void ata_set_mode(struct ata_port *ap)
if (!ata_dev_present(dev)) if (!ata_dev_present(dev))
continue; continue;
if (ata_dev_set_mode(ap, dev)) rc = ata_dev_set_mode(ap, dev);
if (rc)
goto err_out; goto err_out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment