diff options
author | Jean-Philippe Brucker <[email protected]> | 2018-07-17 19:14:45 -0700 |
---|---|---|
committer | Dominique Martinet <[email protected]> | 2018-08-13 09:21:44 +0900 |
commit | 92aef4675d5b1b55404e1532379e343bed0e5cf2 (patch) | |
tree | c665f7be0788a4915e39724ddeb6f83c88a43001 | |
parent | b87d1d26521ef9f2e42bb182184d1427b4e07b26 (diff) |
net/9p: fix error path of p9_virtio_probe
Currently when virtio_find_single_vq fails, we go through del_vqs which
throws a warning (Trying to free already-free IRQ). Skip del_vqs if vq
allocation failed.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jean-Philippe Brucker <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Cc: Eric Van Hensbergen <[email protected]>
Cc: Ron Minnich <[email protected]>
Cc: Latchesar Ionkov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dominique Martinet <[email protected]>
-rw-r--r-- | net/9p/trans_virtio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 05006cbb3361..eaacce086427 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -563,7 +563,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) chan->vq = virtio_find_single_vq(vdev, req_done, "requests"); if (IS_ERR(chan->vq)) { err = PTR_ERR(chan->vq); - goto out_free_vq; + goto out_free_chan; } chan->vq->vdev->priv = chan; spin_lock_init(&chan->lock); @@ -616,6 +616,7 @@ out_free_tag: kfree(tag); out_free_vq: vdev->config->del_vqs(vdev); +out_free_chan: kfree(chan); fail: return err; |