Commit 78bfee0e authored by Julia Lawall's avatar Julia Lawall Committed by Mark Brown

spi: spi-sh-hspi: drop frees of devm_ alloc'd data

devm free functions should not have to be explicitly used.

A semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

(
* devm_kfree(...);
|
* devm_free_irq(...);
|
* devm_iounmap(...);
|
* devm_release_region(...);
|
* devm_release_mem_region(...);
)
// </smpl>
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent b4b84826
...@@ -283,7 +283,7 @@ static int __devinit hspi_probe(struct platform_device *pdev) ...@@ -283,7 +283,7 @@ static int __devinit hspi_probe(struct platform_device *pdev)
ret = spi_register_master(master); ret = spi_register_master(master);
if (ret < 0) { if (ret < 0) {
dev_err(&pdev->dev, "spi_register_master error.\n"); dev_err(&pdev->dev, "spi_register_master error.\n");
goto error2; goto error1;
} }
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
...@@ -292,8 +292,6 @@ static int __devinit hspi_probe(struct platform_device *pdev) ...@@ -292,8 +292,6 @@ static int __devinit hspi_probe(struct platform_device *pdev)
return 0; return 0;
error2:
devm_iounmap(hspi->dev, hspi->addr);
error1: error1:
clk_put(clk); clk_put(clk);
error0: error0:
...@@ -310,7 +308,6 @@ static int __devexit hspi_remove(struct platform_device *pdev) ...@@ -310,7 +308,6 @@ static int __devexit hspi_remove(struct platform_device *pdev)
clk_put(hspi->clk); clk_put(hspi->clk);
spi_unregister_master(hspi->master); spi_unregister_master(hspi->master);
devm_iounmap(hspi->dev, hspi->addr);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment