From ae9060377a67a0840f980bc0e2cb32af07baf479 Mon Sep 17 00:00:00 2001 From: "Chuanxiao.Dong" Date: Fri, 1 Aug 2014 14:00:13 +0800 Subject: [PATCH] mmc: sdhci: fix the wrong type of curr curr should use signed type since it will contain the returned value which is possible to be a negative value. Using u32 will make the returned value to be true even there is a negative result. Change to use int instead of u32 Signed-off-by: Chuanxiao Dong Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 37b2a9ae52ef..d25deff305a5 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3049,7 +3049,7 @@ int sdhci_add_host(struct sdhci_host *host) */ max_current_caps = sdhci_readl(host, SDHCI_MAX_CURRENT); if (!max_current_caps && !IS_ERR(mmc->supply.vmmc)) { - u32 curr = regulator_get_current_limit(mmc->supply.vmmc); + int curr = regulator_get_current_limit(mmc->supply.vmmc); if (curr > 0) { /* convert to SDHCI_MAX_CURRENT format */ -- 2.11.0