From: Wei Yongjun Date: Tue, 7 Jan 2014 13:36:24 +0000 (+0800) Subject: spi: dw-pci: remove free for resources allocated with devm_* X-Git-Tag: firefly_0821_release~176^2~4567^2~4^10 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=136c8bf374dd9aef0f98e5c26d1cba5b066e2443;p=firefly-linux-kernel-4.4.55.git spi: dw-pci: remove free for resources allocated with devm_* It's not necessary to free resources allocated with devm_* and free them may lead to double free. Fixes: 04f421e7b0b1 ('spi: dw: use managed resources') Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c index 9622e5ee1263..d4603efbd9bf 100644 --- a/drivers/spi/spi-dw-pci.c +++ b/drivers/spi/spi-dw-pci.c @@ -91,10 +91,6 @@ static void spi_pci_remove(struct pci_dev *pdev) struct dw_spi_pci *dwpci = pci_get_drvdata(pdev); dw_spi_remove_host(&dwpci->dws); - iounmap(dwpci->dws.regs); - pci_release_region(pdev, 0); - kfree(dwpci); - pci_disable_device(pdev); } #ifdef CONFIG_PM