lkml.org 
[lkml]   [2021]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] blk-zoned: Remove needless request_queue NULL pointer checks
Date
The request_queue pointer returned from bdev_get_queue() shall
never be NULL, so the NULL checks are unnecessary, just remove them.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
block/blk-zoned.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 1d0c76c18fc5..5160972a009a 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -354,8 +354,6 @@ int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode,
return -EINVAL;

q = bdev_get_queue(bdev);
- if (!q)
- return -ENXIO;

if (!blk_queue_is_zoned(q))
return -ENOTTY;
@@ -412,8 +410,6 @@ int blkdev_zone_mgmt_ioctl(struct block_device *bdev, fmode_t mode,
return -EINVAL;

q = bdev_get_queue(bdev);
- if (!q)
- return -ENXIO;

if (!blk_queue_is_zoned(q))
return -ENOTTY;
--
2.17.1
\
 
 \ /
  Last update: 2021-09-10 04:24    [W:0.034 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site