From 435f3e385962e2b34855e9b34f8b95717c1016a2 Mon Sep 17 00:00:00 2001 From: Alexander Tarasikov Date: Sun, 21 Aug 2011 15:52:43 +0400 Subject: [PATCH] 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 Acked-by: Sahitya Tummala Signed-off-by: David Brown Signed-off-by: Chris Ball --- drivers/mmc/host/msm_sdcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index a4c865a5286..d06539dff7c 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; -- 2.39.5