diff options
Diffstat (limited to 'drivers/remoteproc/ste_modem_rproc.c')
| -rw-r--r-- | drivers/remoteproc/ste_modem_rproc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/remoteproc/ste_modem_rproc.c b/drivers/remoteproc/ste_modem_rproc.c index a7743c069339..fb95c4220052 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) | |||
| 240 | 240 | ||
| 241 | /* Unregister as remoteproc device */ | 241 | /* Unregister as remoteproc device */ |
| 242 | rproc_del(sproc->rproc); | 242 | rproc_del(sproc->rproc); |
| 243 | dma_free_coherent(sproc->rproc->dev.parent, SPROC_FW_SIZE, | ||
| 244 | sproc->fw_addr, sproc->fw_dma_addr); | ||
| 243 | rproc_put(sproc->rproc); | 245 | rproc_put(sproc->rproc); |
| 244 | 246 | ||
| 245 | mdev->drv_data = NULL; | 247 | mdev->drv_data = NULL; |
| @@ -297,10 +299,13 @@ static int sproc_probe(struct platform_device *pdev) | |||
| 297 | /* Register as a remoteproc device */ | 299 | /* Register as a remoteproc device */ |
| 298 | err = rproc_add(rproc); | 300 | err = rproc_add(rproc); |
| 299 | if (err) | 301 | if (err) |
| 300 | goto free_rproc; | 302 | goto free_mem; |
| 301 | 303 | ||
| 302 | return 0; | 304 | return 0; |
| 303 | 305 | ||
| 306 | free_mem: | ||
| 307 | dma_free_coherent(rproc->dev.parent, SPROC_FW_SIZE, | ||
| 308 | sproc->fw_addr, sproc->fw_dma_addr); | ||
| 304 | free_rproc: | 309 | free_rproc: |
| 305 | /* Reset device data upon error */ | 310 | /* Reset device data upon error */ |
| 306 | mdev->drv_data = NULL; | 311 | mdev->drv_data = NULL; |
