diff options
-rw-r--r-- | net/9p/trans_virtio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index daa749c8b3fb..d8e376a5f0f1 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
@@ -524,6 +524,12 @@ static int p9_virtio_probe(struct virtio_device *vdev) | |||
524 | int err; | 524 | int err; |
525 | struct virtio_chan *chan; | 525 | struct virtio_chan *chan; |
526 | 526 | ||
527 | if (!vdev->config->get) { | ||
528 | dev_err(&vdev->dev, "%s failure: config access disabled\n", | ||
529 | __func__); | ||
530 | return -EINVAL; | ||
531 | } | ||
532 | |||
527 | chan = kmalloc(sizeof(struct virtio_chan), GFP_KERNEL); | 533 | chan = kmalloc(sizeof(struct virtio_chan), GFP_KERNEL); |
528 | if (!chan) { | 534 | if (!chan) { |
529 | pr_err("Failed to allocate virtio 9P channel\n"); | 535 | pr_err("Failed to allocate virtio 9P channel\n"); |