diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/cd-gpio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/core/cd-gpio.c b/drivers/mmc/core/cd-gpio.c index 2c14be73254c..f13e38deceac 100644 --- a/drivers/mmc/core/cd-gpio.c +++ b/drivers/mmc/core/cd-gpio.c | |||
@@ -73,6 +73,9 @@ void mmc_cd_gpio_free(struct mmc_host *host) | |||
73 | { | 73 | { |
74 | struct mmc_cd_gpio *cd = host->hotplug.handler_priv; | 74 | struct mmc_cd_gpio *cd = host->hotplug.handler_priv; |
75 | 75 | ||
76 | if (!cd) | ||
77 | return; | ||
78 | |||
76 | free_irq(host->hotplug.irq, host); | 79 | free_irq(host->hotplug.irq, host); |
77 | gpio_free(cd->gpio); | 80 | gpio_free(cd->gpio); |
78 | kfree(cd); | 81 | kfree(cd); |