diff options
author | Sjur Brændeland <sjur.brandeland@stericsson.com> | 2013-02-21 17:15:32 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-12 16:52:08 (GMT) |
commit | ccc4026c520728c39ad36cfa8ca960be9aa560fa (patch) | |
tree | 5a6eb6ca2edf93232b33879d8df64fc53bc4e49e /drivers/remoteproc | |
parent | cb70adc51e456ea0bafd519e99d46cfc7f1b5c24 (diff) | |
download | linux-fsl-qoriq-ccc4026c520728c39ad36cfa8ca960be9aa560fa.tar.xz |
remoteproc: fix error path of handle_vdev
commit cde42e076c1cdd69a1f955d66ff6596bad3d2105 upstream.
Remove the vdev entry from the list before freeing it,
otherwise rproc->vdevs will explode.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Acked-by: Ido Yariv <ido@wizery.com>
[edit subject, minor commit log edit, cc stable]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index dd3bfaf..752b507 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -370,10 +370,12 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc, /* it is now safe to add the virtio device */ ret = rproc_add_virtio_dev(rvdev, rsc->id); if (ret) - goto free_rvdev; + goto remove_rvdev; return 0; +remove_rvdev: + list_del(&rvdev->node); free_rvdev: kfree(rvdev); return ret; |