diff options
author | Suman Anna <s-anna@ti.com> | 2015-02-02 17:08:46 -0600 |
---|---|---|
committer | Suman Anna <s-anna@ti.com> | 2015-02-02 18:38:27 -0600 |
commit | 33a427b820334985a108cf909a22d3b21b18ff0f (patch) | |
tree | d077d70bd1eeb4b9d1a1bf53c3517b4cf3625753 /drivers | |
parent | 3b0f876852c6ae3fc5389545ec311e2ee1a6d0dc (diff) |
remoteproc/pruss: fix the cleanup path in pru_rproc_probe()
The PRU remoteproc driver can manually boot a processor if
the corresponding firmware doesn't support virtio devices.
However, the current cleanup code doesn't undo the operations
performed by rproc_add() in case the manual boot fails. A
successful rproc_add() requires the corresponding rproc_del()
to be called during cleanup, so fix the same.
Signed-off-by: Suman Anna <s-anna@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/remoteproc/pruss_remoteproc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/remoteproc/pruss_remoteproc.c b/drivers/remoteproc/pruss_remoteproc.c index da00a8048ef..c528efe6a88 100644 --- a/drivers/remoteproc/pruss_remoteproc.c +++ b/drivers/remoteproc/pruss_remoteproc.c @@ -890,7 +890,7 @@ static int pru_rproc_probe(struct platform_device *pdev) ret = rproc_boot(pru->rproc); if (ret) { dev_err(dev, "rproc_boot failed\n"); - goto put_mbox; + goto del_rproc; } } @@ -901,6 +901,8 @@ static int pru_rproc_probe(struct platform_device *pdev) return 0; +del_rproc: + rproc_del(pru->rproc); put_mbox: mbox_free_channel(pru->mbox); free_rproc: |