summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-05-03 12:52:12 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-05-10 14:44:17 +0100
commitdb90f91f6f4a870583d5c11cda187f20e4d835ae (patch)
treea3f61581992c2f5e14177cf7f443653b94723f2f /drivers/mmc
parentc01c5a506b59a8248b7666c779eb4ed689937874 (diff)
downloadop-kernel-dev-db90f91f6f4a870583d5c11cda187f20e4d835ae.zip
op-kernel-dev-db90f91f6f4a870583d5c11cda187f20e4d835ae.tar.gz
ARM: 7714/1: mmc: mmci: Ensure return value of regulator_enable() is checked
This patch suppresses the warning below: drivers/mmc/host/mmci.c: In function ‘mmci_set_ios’: drivers/mmc/host/mmci.c:1165:20: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result [-Wunused-result] Cc: Chris Ball <cjb@laptop.org> Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmci.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 375c109..f4f3038 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1130,6 +1130,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
struct variant_data *variant = host->variant;
u32 pwr = 0;
unsigned long flags;
+ int ret;
pm_runtime_get_sync(mmc_dev(mmc));
@@ -1161,8 +1162,12 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
break;
case MMC_POWER_ON:
if (!IS_ERR(mmc->supply.vqmmc) &&
- !regulator_is_enabled(mmc->supply.vqmmc))
- regulator_enable(mmc->supply.vqmmc);
+ !regulator_is_enabled(mmc->supply.vqmmc)) {
+ ret = regulator_enable(mmc->supply.vqmmc);
+ if (ret < 0)
+ dev_err(mmc_dev(mmc),
+ "failed to enable vqmmc regulator\n");
+ }
pwr |= MCI_PWR_ON;
break;
OpenPOWER on IntegriCloud