summaryrefslogtreecommitdiffstats
path: root/net/9p/trans_virtio.c
diff options
context:
space:
mode:
authorIngo Molnar2015-02-24 15:55:28 +0100
committerIngo Molnar2015-02-24 15:55:28 +0100
commita1fb6696c662920f695c97591d759391aca8a1ad (patch)
tree25cc9ca4d1d291e122ff694dd41a9cc6d6513f60 /net/9p/trans_virtio.c
parentx86/mm/pat: Ensure different messages in STRICT_DEVMEM and PAT cases (diff)
parentLinux 4.0-rc1 (diff)
downloadkernel-qcow2-linux-a1fb6696c662920f695c97591d759391aca8a1ad.tar.gz
kernel-qcow2-linux-a1fb6696c662920f695c97591d759391aca8a1ad.tar.xz
kernel-qcow2-linux-a1fb6696c662920f695c97591d759391aca8a1ad.zip
Merge tag 'v4.0-rc1' into x86/mm, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/9p/trans_virtio.c')
-rw-r--r--net/9p/trans_virtio.c6
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)
int err;
struct virtio_chan *chan;
+ if (!vdev->config->get) {
+ dev_err(&vdev->dev, "%s failure: config access disabled\n",
+ __func__);
+ return -EINVAL;
+ }
+
chan = kmalloc(sizeof(struct virtio_chan), GFP_KERNEL);
if (!chan) {
pr_err("Failed to allocate virtio 9P channel\n");