summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mic
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-28 08:13:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-28 08:13:52 +0100
commitfdddcfd9c93c6db006004fa5ba7fd9380e721c3f (patch)
tree4d029f3bd29be07eac87bcfad3bd7e3012fb9428 /drivers/misc/mic
parentf9f7bb9e0a0ca33f65a3deae9ec5e07266908fc5 (diff)
parentf17b5f06cb92ef2250513a1e154c47b78df07d40 (diff)
downloadlinux-fdddcfd9c93c6db006004fa5ba7fd9380e721c3f.tar.gz
linux-fdddcfd9c93c6db006004fa5ba7fd9380e721c3f.tar.bz2
linux-fdddcfd9c93c6db006004fa5ba7fd9380e721c3f.zip
Merge 5.0-rc4 into char-misc-next
We need the char-misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mic')
-rw-r--r--drivers/misc/mic/vop/vop_main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c
index 47a096ddc6fe..4329fdbce15e 100644
--- a/drivers/misc/mic/vop/vop_main.c
+++ b/drivers/misc/mic/vop/vop_main.c
@@ -395,16 +395,21 @@ static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs,
struct _vop_vdev *vdev = to_vopvdev(dev);
struct vop_device *vpdev = vdev->vpdev;
struct mic_device_ctrl __iomem *dc = vdev->dc;
- int i, err, retry;
+ int i, err, retry, queue_idx = 0;
/* We must have this many virtqueues. */
if (nvqs > ioread8(&vdev->desc->num_vq))
return -ENOENT;
for (i = 0; i < nvqs; ++i) {
+ if (!names[i]) {
+ vqs[i] = NULL;
+ continue;
+ }
+
dev_dbg(_vop_dev(vdev), "%s: %d: %s\n",
__func__, i, names[i]);
- vqs[i] = vop_find_vq(dev, i, callbacks[i], names[i],
+ vqs[i] = vop_find_vq(dev, queue_idx++, callbacks[i], names[i],
ctx ? ctx[i] : false);
if (IS_ERR(vqs[i])) {
err = PTR_ERR(vqs[i]);