aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorGiuseppe Cavallaro <peppe.cavallaro@st.com>2010-09-28 04:41:28 -0400
committerChris Ball <cjb@laptop.org>2010-10-23 09:11:17 -0400
commit8364248a829d50495a796e7561aaf9a6976f846c (patch)
treee57cda5fc1109dc0ac609fa74fa4a0d7a89bf248 /drivers/mmc
parentbe8ae09d9a800a40771c93356216678aff9ca577 (diff)
mmc: sdhci: fix "pwr may be used uninitialized" warning
This patch fixes a warning when compiling the sdhci driver: pwr may be used uninitialized in sdhci_set_power Tested with the following compiler versions: 4.2.4 and 4.4.4 Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 96c7f6010d0d..d3f924bcfffd 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1050,11 +1050,9 @@ out:
1050 1050
1051static void sdhci_set_power(struct sdhci_host *host, unsigned short power) 1051static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
1052{ 1052{
1053 u8 pwr; 1053 u8 pwr = 0;
1054 1054
1055 if (power == (unsigned short)-1) 1055 if (power != (unsigned short)-1) {
1056 pwr = 0;
1057 else {
1058 switch (1 << power) { 1056 switch (1 << power) {
1059 case MMC_VDD_165_195: 1057 case MMC_VDD_165_195:
1060 pwr = SDHCI_POWER_180; 1058 pwr = SDHCI_POWER_180;