summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc/remoteproc_virtio.c
diff options
context:
space:
mode:
authorweiping zhang <zhangweiping@didichuxing.com>2017-12-21 13:40:58 +0100
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-01-02 18:32:30 +0100
commit900a163ededfd1458d622781b2af7ea855497c35 (patch)
treef8df18866bc60a23a5defdc6ba9be8a51ceef582 /drivers/remoteproc/remoteproc_virtio.c
parentLinux 4.15-rc1 (diff)
downloadlinux-900a163ededfd1458d622781b2af7ea855497c35.tar.xz
linux-900a163ededfd1458d622781b2af7ea855497c35.zip
virtio_remoteproc: correct put_device virtio_device.dev
rproc_virtio_dev_release will be called iff virtio_device.dev's reference count drops to 0. Here we just put vdev.dev, and then rproc->dev's cleanup will be done in rproc_virtio_dev_release. Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: weiping zhang <zhangweiping@didichuxing.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/remoteproc_virtio.c')
-rw-r--r--drivers/remoteproc/remoteproc_virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
index 294634836b32..b0633fd4c041 100644
--- a/drivers/remoteproc/remoteproc_virtio.c
+++ b/drivers/remoteproc/remoteproc_virtio.c
@@ -327,7 +327,7 @@ int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id)
ret = register_virtio_device(vdev);
if (ret) {
- put_device(&rproc->dev);
+ put_device(&vdev->dev);
dev_err(dev, "failed to register vdev: %d\n", ret);
goto out;
}