From: Tony Lindgren <tony@atomide.com>
To: Felipe Balbi <felipe.balbi@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] omap: hsmmc: Avoid NULL pointer dereference
Date: Thu, 3 Jul 2008 13:21:47 +0300 [thread overview]
Message-ID: <20080703102144.GI14276@atomide.com> (raw)
In-Reply-To: <1214835387-11123-1-git-send-email-felipe.balbi@nokia.com>
* Felipe Balbi <felipe.balbi@nokia.com> [080630 17:18]:
> Try if pdata provides a cleanup function pointers. For
> boards which don't provide it, driver will oops in
> omap_remove.
Pushing today.
Tony
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> ---
> drivers/mmc/host/omap_hsmmc.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 467f146..4dfa8dd 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -887,7 +887,8 @@ static int omap_mmc_remove(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, NULL);
> if (host) {
> - host->pdata->cleanup(&pdev->dev);
> + if (host->pdata->cleanup)
> + host->pdata->cleanup(&pdev->dev);
> free_irq(host->irq, host);
> if (mmc_slot(host).card_detect_irq)
> free_irq(mmc_slot(host).card_detect_irq, host);
> --
> 1.5.6.49.g112db
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2008-07-03 12:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-30 14:16 [PATCH] omap: hsmmc: Avoid NULL pointer dereference Felipe Balbi
2008-07-03 10:21 ` Tony Lindgren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080703102144.GI14276@atomide.com \
--to=tony@atomide.com \
--cc=felipe.balbi@nokia.com \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox