Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[deliverable/linux.git] / drivers / scsi / virtio_scsi.c
index c52bb5dfaedb1daa52e37076e2012442c6625e90..f164f24a4a556cfe19c91f9031682a8ff6d9f0c5 100644 (file)
@@ -950,6 +950,12 @@ static int virtscsi_probe(struct virtio_device *vdev)
        u32 num_queues;
        struct scsi_host_template *hostt;
 
+       if (!vdev->config->get) {
+               dev_err(&vdev->dev, "%s failure: config access disabled\n",
+                       __func__);
+               return -EINVAL;
+       }
+
        /* We need to know how many queues before we allocate. */
        num_queues = virtscsi_config_get(vdev, num_queues) ? : 1;
 
This page took 0.031093 seconds and 5 git commands to generate.