Skip to content

Commit

Permalink
mmc: msm_sdcc: Fix a typo in MSM SDCC driver gpio setup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Tarasikov authored and Chris Ball committed Oct 26, 2011
1 parent cb2ccc3 commit 435f3e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/msm_sdcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ static void msmsdcc_setup_gpio(struct msmsdcc_host *host, bool enable)
struct msm_mmc_gpio_data *curr;
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;

curr = host->plat->gpio_data;
Expand Down

0 comments on commit 435f3e3

Please sign in to comment.