Patchwork [3.5.y.z,extended,stable] Patch "remoteproc: fix error path of handle_vdev" has been added to staging queue

mail settings
Submitter Luis Henriques
Date April 11, 2013, 9:09 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/235621/
State New
Headers show


Luis Henriques - April 11, 2013, 9:09 a.m.
This is a note to let you know that I have just added a patch titled

    remoteproc: fix error path of handle_vdev

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 75df91dff57977cdc2be799bca87cc28e41ae884 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sjur=20Br=C3=A6ndeland?= <>
Date: Thu, 21 Feb 2013 18:15:32 +0100
Subject: [PATCH] remoteproc: fix error path of handle_vdev
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

commit cde42e076c1cdd69a1f955d66ff6596bad3d2105 upstream.

Remove the vdev entry from the list before freeing it,
otherwise rproc->vdevs will explode.

Signed-off-by: Sjur Brændeland <>
Acked-by: Ido Yariv <>
[edit subject, minor commit log edit, cc stable]
Signed-off-by: Ohad Ben-Cohen <>
[ luis: adjust context ]
Signed-off-by: Luis Henriques <>
 drivers/remoteproc/remoteproc_core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)



diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 99b6ee7..82702aa 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -440,10 +440,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_vrings;
+		goto remove_rvdev;

 	return 0;

+	list_del(&rvdev->node);
 	__rproc_free_vrings(rvdev, i);