[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1420711540-17425-1-git-send-email-j@bitron.ch>
Date: Thu, 8 Jan 2015 11:05:40 +0100
From: Jürg Billeter <j@...ron.ch>
To: Rusty Russell <rusty@...tcorp.com.au>,
"Michael S. Tsirkin" <mst@...hat.com>
Cc: virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org,
Jürg Billeter <j@...ron.ch>
Subject: [PATCH] virtio_blk: fix blk_mq_init_queue() error handling
blk_mq_init_queue() returns ERR_PTR() on failure, not NULL.
Signed-off-by: Jürg Billeter <j@...ron.ch>
---
drivers/block/virtio_blk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 7ef7c09..b1b5c75 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -638,8 +638,8 @@ static int virtblk_probe(struct virtio_device *vdev)
goto out_put_disk;
q = vblk->disk->queue = blk_mq_init_queue(&vblk->tag_set);
- if (!q) {
- err = -ENOMEM;
+ if (IS_ERR(q)) {
+ err = PTR_ERR(q);
goto out_free_tags;
}
--
2.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists