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

mmc: cb710: drop free_irq for devm_request_irq allocated irq

irq allocated with devm_request_irq should not be freed using
free_irq, because doing so causes a dangling pointer, and a
subsequent double free.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Wei Yongjun and committed by
Greg Kroah-Hartman
0a335b6d 8d497515

+1 -1
+1 -1
drivers/misc/cb710/core.c
··· 176 176 { 177 177 struct cb710_chip *chip = pci_get_drvdata(pdev); 178 178 179 - free_irq(pdev->irq, chip); 179 + devm_free_irq(&pdev->dev, pdev->irq, chip); 180 180 pci_save_state(pdev); 181 181 pci_disable_device(pdev); 182 182 if (state.event & PM_EVENT_SLEEP)