Commit 654a3667 authored by Chaitanya Kulkarni's avatar Chaitanya Kulkarni Committed by Jens Axboe

block: return NULL in blk_alloc_queue() on error

This patch fixes follwoing warning:

block/blk-core.c: In function ‘blk_alloc_queue’:
block/blk-core.c:558:10: warning: returning ‘int’ from a function with return type ‘struct request_queue *’ makes pointer from integer without a cast [-Wint-conversion]
   return -EINVAL;

Fixes: 3d745ea5 ("block: simplify queue allocation")
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 130879f1
......@@ -555,7 +555,7 @@ struct request_queue *blk_alloc_queue(make_request_fn make_request, int node_id)
struct request_queue *q;
if (WARN_ON_ONCE(!make_request))
return -EINVAL;
return NULL;
q = __blk_alloc_queue(node_id);
if (!q)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment