linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: return NULL in blk_alloc_queue() on error
@ 2020-03-28 18:27 Chaitanya Kulkarni
  2020-03-28 21:32 ` Guoqing Jiang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2020-03-28 18:27 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, hch, Chaitanya Kulkarni

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 878 bytes --]

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: 3d745ea5b095a ("block: simplify queue allocation")
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 block/blk-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 18b8c09d093e..7e4a1da0715e 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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)
-- 
2.22.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-29 16:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-28 18:27 [PATCH] block: return NULL in blk_alloc_queue() on error Chaitanya Kulkarni
2020-03-28 21:32 ` Guoqing Jiang
2020-03-28 23:42   ` Chaitanya Kulkarni
2020-03-29 12:10     ` hch
2020-03-29 12:09 ` Christoph Hellwig
2020-03-29 16:08 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).