Make ata_set_mode() return correct error value when ata_dev_set_mode() fails. Signed-off-by: Tejun Heo <htejun@xxxxxxxxx> --- drivers/scsi/libata-core.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) f88bb95c5b31979a787a4150953820c8e77d7f29 diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index e63c1ff..8def7a5 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 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; } -- 1.2.4 - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html