From: weiping zhang Date: Thu, 21 Dec 2017 12:40:58 +0000 (+0800) Subject: virtio_remoteproc: correct put_device virtio_device.dev X-Git-Tag: v4.19~1642^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=900a163ededfd1458d622781b2af7ea855497c35;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: weiping zhang Signed-off-by: Bjorn Andersson --- diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c index 2946348..b0633fd 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; }