spi: dw-pci: remove free for resources allocated with devm_*
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 7 Jan 2014 13:36:24 +0000 (21:36 +0800)
committerMark Brown <broonie@linaro.org>
Tue, 7 Jan 2014 15:47:18 +0000 (15:47 +0000)
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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-dw-pci.c

index 9622e5ee12638b3a7f3426d37659843ad68cc073..d4603efbd9bf74b24ce3b01e334a60e397ece5e9 100644 (file)
@@ -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