Merge tag 'omap-for-v3.7-rc1/fixes-pm-signed' of git://git.kernel.org/pub/scm/linux...
[firefly-linux-kernel-4.4.55.git] / drivers / remoteproc / remoteproc_virtio.c
index 3541b4492f644efa200509e09531b3e0a383bbe6..e7a4780e93db4fb8ab9c3134debc960930cd6906 100644 (file)
@@ -84,6 +84,9 @@ static struct virtqueue *rp_find_vq(struct virtio_device *vdev,
        if (id >= ARRAY_SIZE(rvdev->vring))
                return ERR_PTR(-EINVAL);
 
+       if (!name)
+               return NULL;
+
        ret = rproc_alloc_vring(rvdev, id);
        if (ret)
                return ERR_PTR(ret);
@@ -103,7 +106,7 @@ static struct virtqueue *rp_find_vq(struct virtio_device *vdev,
         * Create the new vq, and tell virtio we're not interested in
         * the 'weak' smp barriers, since we're talking with a real device.
         */
-       vq = vring_new_virtqueue(len, rvring->align, vdev, false, addr,
+       vq = vring_new_virtqueue(id, len, rvring->align, vdev, false, addr,
                                        rproc_virtio_notify, callback, name);
        if (!vq) {
                dev_err(dev, "vring_new_virtqueue %s failed\n", name);