RISC-V: Add mvendorid, marchid, and mimpid to /proc/cpuinfo output
[platform/kernel/linux-starfive.git] / drivers / virtio / virtio.c
index 14c142d..828ced0 100644 (file)
@@ -428,7 +428,9 @@ int register_virtio_device(struct virtio_device *dev)
                goto out;
 
        dev->index = err;
-       dev_set_name(&dev->dev, "virtio%u", dev->index);
+       err = dev_set_name(&dev->dev, "virtio%u", dev->index);
+       if (err)
+               goto out_ida_remove;
 
        err = virtio_device_of_init(dev);
        if (err)