Re: [PATCH] omap: hsmmc: Avoid NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Felipe Balbi <felipe.balbi@xxxxxxxxx> [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@xxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux