* [PATCH] omap: hsmmc: Avoid NULL pointer dereference
@ 2008-06-30 14:16 Felipe Balbi
2008-07-03 10:21 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Felipe Balbi @ 2008-06-30 14:16 UTC (permalink / raw)
To: linux-omap; +Cc: Felipe Balbi
Try if pdata provides a cleanup function pointers. For
boards which don't provide it, driver will oops in
omap_remove.
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] omap: hsmmc: Avoid NULL pointer dereference
2008-06-30 14:16 [PATCH] omap: hsmmc: Avoid NULL pointer dereference Felipe Balbi
@ 2008-07-03 10:21 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2008-07-03 10:21 UTC (permalink / raw)
To: Felipe Balbi; +Cc: linux-omap
* 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-03 12:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-30 14:16 [PATCH] omap: hsmmc: Avoid NULL pointer dereference Felipe Balbi
2008-07-03 10:21 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox