Message ID | 1313927564-10355-2-git-send-email-alexander.tarasikov@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sun, Aug 21, 2011 at 03:52:43PM +0400, Alexander Tarasikov wrote: > 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> > --- > 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 a4c865a..d06539d 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; Both of your patches have somehow gotten mangled in transit (the context lines have lost their leading space). Did you perhaps edit the patch files with an editor that is configured to fold spaces into tabs? I was able to fix up the files and apply the patches, and will include these once Sahitya has a chance to review them. Thanks, David
2011/8/22 David Brown <davidb@codeaurora.org>: > Both of your patches have somehow gotten mangled in transit (the > context lines have lost their leading space). Did you perhaps edit > the patch files with an editor that is configured to fold spaces into > tabs? Sorry for that, it was my first attempt ever at sending patches, i'll try to do better the next time. I was using git send-email and vim for compose. > I was able to fix up the files and apply the patches, and will include > these once Sahitya has a chance to review them. > Okay, thank you. Hope one day the rest of drivers (rpc, i2c, gpio, usb) get integrated and msm/qsd will be usable with vanilla kernel.
On Mon, Aug 22, 2011 at 08:25:16PM +0400, Alexander Tarasikov wrote: > 2011/8/22 David Brown <davidb@codeaurora.org>: > > Both of your patches have somehow gotten mangled in transit (the > > context lines have lost their leading space). Did you perhaps edit > > the patch files with an editor that is configured to fold spaces into > > tabs? > Sorry for that, it was my first attempt ever at sending patches, i'll > try to do better the next time. I was using git send-email and vim for > compose. It's mostly important that when you edit a patch file, you make sure that it doesn't change parts of the file that you aren't editing. > > I was able to fix up the files and apply the patches, and will include > > these once Sahitya has a chance to review them. > > > Okay, thank you. Hope one day the rest of drivers (rpc, i2c, gpio, > usb) get integrated and msm/qsd will be usable with vanilla kernel. We're working on a lot of the stuff. However, it is unlikely that there will be much support for anything new on the msm7200 target. I'm trying to keep the 8x50 going, but even that is hard to get people interested in working on it. David
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index a4c865a..d06539d 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;
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> --- drivers/mmc/host/msm_sdcc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html