提交 db90f91f 编写于 作者: L Lee Jones 提交者: Russell King

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: NSrinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 c01c5a50
...@@ -1130,6 +1130,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ...@@ -1130,6 +1130,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
struct variant_data *variant = host->variant; struct variant_data *variant = host->variant;
u32 pwr = 0; u32 pwr = 0;
unsigned long flags; unsigned long flags;
int ret;
pm_runtime_get_sync(mmc_dev(mmc)); pm_runtime_get_sync(mmc_dev(mmc));
...@@ -1161,8 +1162,12 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ...@@ -1161,8 +1162,12 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
break; break;
case MMC_POWER_ON: case MMC_POWER_ON:
if (!IS_ERR(mmc->supply.vqmmc) && if (!IS_ERR(mmc->supply.vqmmc) &&
!regulator_is_enabled(mmc->supply.vqmmc)) !regulator_is_enabled(mmc->supply.vqmmc)) {
regulator_enable(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; pwr |= MCI_PWR_ON;
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册