Re: [PATCH] mmc: core: Fixup Oops for SDIO shutdown

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

 



Acked-by: Jaehoon Chung <jh80.chung@xxxxxxxxxxx>

Best Regards,
Jaehoon Chung

On 07/02/2013 07:53 PM, Ulf Hansson wrote:
> Commit "mmc: core: Handle card shutdown from mmc_bus" introduced an
> Oops in the shutdown sequence for SDIO.
> 
> The drv pointer, does not exist for SDIO since the probing of the SDIO
> card from the mmc_bus perspective is expected to fail by returning
> -ENODEV.
> 
> This patch adds the proper check for the pointer before calling it.
> 
> Reported-by: Stephen Warren <swarren@xxxxxxxxxxxxx>
> Reported-by: Tuomas Tynkkynen <ttynkkynen@xxxxxxxxxx>
> Cc: Jaehoon Chung <jh80.chung@xxxxxxxxxxx>
> Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
> ---
>  drivers/mmc/core/bus.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
> index 4c0decf..d4b99bb 100644
> --- a/drivers/mmc/core/bus.c
> +++ b/drivers/mmc/core/bus.c
> @@ -129,7 +129,8 @@ static void mmc_bus_shutdown(struct device *dev)
>  	struct mmc_host *host = card->host;
>  	int ret;
>  
> -	drv->shutdown(card);
> +	if (dev->driver && drv->shutdown)
> +		drv->shutdown(card);
>  
>  	if (host->bus_ops->shutdown) {
>  		ret = host->bus_ops->shutdown(host);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux