diff options
author | Alexander Tarasikov <alexander.tarasikov@gmail.com> | 2011-08-21 15:52:43 +0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-10-26 15:43:36 -0400 |
commit | 435f3e385962e2b34855e9b34f8b95717c1016a2 (patch) | |
tree | 2107757d2bc047fce1880a042dfd7e436d4bab46 /drivers/mmc/host/msm_sdcc.c | |
parent | cb2ccc32208cb91edf7363c0809ca9e42c4e04ed (diff) | |
download | lwn-435f3e385962e2b34855e9b34f8b95717c1016a2.tar.gz lwn-435f3e385962e2b34855e9b34f8b95717c1016a2.zip |
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>
Diffstat (limited to 'drivers/mmc/host/msm_sdcc.c')
-rw-r--r-- | drivers/mmc/host/msm_sdcc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index a4c865a5286b..d06539dff7cc 100644 --- a/drivers/mmc/host/msm_sdcc.c +++ b/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; 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; |