aboutsummaryrefslogtreecommitdiff
path: root/drivers/remoteproc/ste_modem_rproc.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-16 16:02:41 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-16 16:02:41 +0100
commit60f7110e36ff7858182e8990a2d19fa3df7e05f5 (patch)
tree179c2a9f8fe654694d40536a506345db80705436 /drivers/remoteproc/ste_modem_rproc.c
parent9659293c1784f3d9df2235f6ebf92f6f9059a563 (diff)
parent41ef2d5678d83af030125550329b6ae8b74618fa (diff)
Merge tag 'v3.9-rc7' into regmap-cache
Linux 3.9-rc7
Diffstat (limited to 'drivers/remoteproc/ste_modem_rproc.c')
-rw-r--r--drivers/remoteproc/ste_modem_rproc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/remoteproc/ste_modem_rproc.c b/drivers/remoteproc/ste_modem_rproc.c
index a7743c06933..fb95c422005 100644
--- a/drivers/remoteproc/ste_modem_rproc.c
+++ b/drivers/remoteproc/ste_modem_rproc.c
@@ -240,6 +240,8 @@ static int sproc_drv_remove(struct platform_device *pdev)
/* Unregister as remoteproc device */
rproc_del(sproc->rproc);
+ dma_free_coherent(sproc->rproc->dev.parent, SPROC_FW_SIZE,
+ sproc->fw_addr, sproc->fw_dma_addr);
rproc_put(sproc->rproc);
mdev->drv_data = NULL;
@@ -297,10 +299,13 @@ static int sproc_probe(struct platform_device *pdev)
/* Register as a remoteproc device */
err = rproc_add(rproc);
if (err)
- goto free_rproc;
+ goto free_mem;
return 0;
+free_mem:
+ dma_free_coherent(rproc->dev.parent, SPROC_FW_SIZE,
+ sproc->fw_addr, sproc->fw_dma_addr);
free_rproc:
/* Reset device data upon error */
mdev->drv_data = NULL;