Browse Source

mmc: msm_sdcc: Fix a typo in MSM SDCC driver gpio setup

The use of && instead of || caused a NULL pointer dereference if
gpio setup was not passed via platform data

Signed-off-by: Alexander Tarasikov <alexander.tarasikov@gmail.com>
Acked-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Alexander Tarasikov 14 years ago
parent
commit
435f3e3859
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/mmc/host/msm_sdcc.c

+ 1 - 1
drivers/mmc/host/msm_sdcc.c

@@ -939,7 +939,7 @@ static void msmsdcc_setup_gpio(struct msmsdcc_host *host, bool enable)
 	struct msm_mmc_gpio_data *curr;
 	struct msm_mmc_gpio_data *curr;
 	int i, rc = 0;
 	int i, rc = 0;
 
 
-	if (!host->plat->gpio_data && host->gpio_config_status == enable)
+	if (!host->plat->gpio_data || host->gpio_config_status == enable)
 		return;
 		return;
 
 
 	curr = host->plat->gpio_data;
 	curr = host->plat->gpio_data;