diff options
| author | Lee Jones <lee.jones@linaro.org> | 2013-05-03 07:52:12 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-05-10 09:44:17 -0400 |
| commit | db90f91f6f4a870583d5c11cda187f20e4d835ae (patch) | |
| tree | a3f61581992c2f5e14177cf7f443653b94723f2f | |
| parent | c01c5a506b59a8248b7666c779eb4ed689937874 (diff) | |
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>
| -rw-r--r-- | drivers/mmc/host/mmci.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 375c109607ff..f4f3038c1df0 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) | |||
| 1130 | struct variant_data *variant = host->variant; | 1130 | struct variant_data *variant = host->variant; |
| 1131 | u32 pwr = 0; | 1131 | u32 pwr = 0; |
| 1132 | unsigned long flags; | 1132 | unsigned long flags; |
| 1133 | int ret; | ||
| 1133 | 1134 | ||
| 1134 | pm_runtime_get_sync(mmc_dev(mmc)); | 1135 | pm_runtime_get_sync(mmc_dev(mmc)); |
| 1135 | 1136 | ||
| @@ -1161,8 +1162,12 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
| 1161 | break; | 1162 | break; |
| 1162 | case MMC_POWER_ON: | 1163 | case MMC_POWER_ON: |
| 1163 | if (!IS_ERR(mmc->supply.vqmmc) && | 1164 | if (!IS_ERR(mmc->supply.vqmmc) && |
| 1164 | !regulator_is_enabled(mmc->supply.vqmmc)) | 1165 | !regulator_is_enabled(mmc->supply.vqmmc)) { |
| 1165 | regulator_enable(mmc->supply.vqmmc); | 1166 | ret = regulator_enable(mmc->supply.vqmmc); |
| 1167 | if (ret < 0) | ||
| 1168 | dev_err(mmc_dev(mmc), | ||
| 1169 | "failed to enable vqmmc regulator\n"); | ||
| 1170 | } | ||
| 1166 | 1171 | ||
| 1167 | pwr |= MCI_PWR_ON; | 1172 | pwr |= MCI_PWR_ON; |
| 1168 | break; | 1173 | break; |
