3.3-stable review patch. If anyone has any objections, please let me know.
------------------ From: Guennadi Liakhovetski <[email protected]> commit 0e9f480bb553d39ee06ccd45639ba7a5446a7b81 upstream. Do not oops, even if mmc_cd_gpio_free() is mistakenly called on a driver cleanup path, even though a previous call to mmc_cd_gpio_request() failed. Signed-off-by: Guennadi Liakhovetski <[email protected]> [stable@: please apply to 3.3-stable] Signed-off-by: Chris Ball <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- drivers/mmc/core/cd-gpio.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/mmc/core/cd-gpio.c +++ b/drivers/mmc/core/cd-gpio.c @@ -67,6 +67,9 @@ void mmc_cd_gpio_free(struct mmc_host *h { struct mmc_cd_gpio *cd = host->hotplug.handler_priv; + if (!cd) + return; + free_irq(host->hotplug.irq, host); gpio_free(cd->gpio); kfree(cd); -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
