提交 8364248a 编写于 作者: G Giuseppe Cavallaro 提交者: Chris Ball

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: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: NWolfram Sang <w.sang@pengutronix.de>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 be8ae09d
......@@ -1050,11 +1050,9 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
{
u8 pwr;
u8 pwr = 0;
if (power == (unsigned short)-1)
pwr = 0;
else {
if (power != (unsigned short)-1) {
switch (1 << power) {
case MMC_VDD_165_195:
pwr = SDHCI_POWER_180;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册