Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: sdhci-tegra: free irq on error and remove

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Chris Ball <cjb@laptop.org>

authored by

Wolfram Sang and committed by
Chris Ball
8154b575 f53fbde4

+5 -1
+5 -1
drivers/mmc/host/sdhci-tegra.c
··· 169 169 if (rc) { 170 170 dev_err(mmc_dev(host->mmc), 171 171 "failed to allocate wp gpio\n"); 172 - goto out_cd; 172 + goto out_irq; 173 173 } 174 174 tegra_gpio_enable(plat->wp_gpio); 175 175 gpio_direction_input(plat->wp_gpio); ··· 195 195 gpio_free(plat->wp_gpio); 196 196 } 197 197 198 + out_irq: 199 + if (gpio_is_valid(plat->cd_gpio)) 200 + free_irq(gpio_to_irq(plat->cd_gpio), host); 198 201 out_cd: 199 202 if (gpio_is_valid(plat->cd_gpio)) { 200 203 tegra_gpio_disable(plat->cd_gpio); ··· 228 225 } 229 226 230 227 if (gpio_is_valid(plat->cd_gpio)) { 228 + free_irq(gpio_to_irq(plat->cd_gpio), host); 231 229 tegra_gpio_disable(plat->cd_gpio); 232 230 gpio_free(plat->cd_gpio); 233 231 }