The queue variable is only used to check if it is NULL or not in __blkdev_issue_zero_pages(). The return value of the bdev_get_queue() will not be NULL based on the comment in the bdev_get_queue(). Remove the variable and respective NULL check. Signed-off-by: Chaitanya Kulkarni <kch@xxxxxxxxxx> --- block/blk-lib.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/block/blk-lib.c b/block/blk-lib.c index e7a9ed8cc5df..e6e854936ef6 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -294,14 +294,10 @@ static int __blkdev_issue_zero_pages(struct block_device *bdev, sector_t sector, sector_t nr_sects, gfp_t gfp_mask, struct bio **biop) { - struct request_queue *q = bdev_get_queue(bdev); struct bio *bio = *biop; int bi_size = 0; unsigned int sz; - if (!q) - return -ENXIO; - if (bdev_read_only(bdev)) return -EPERM; -- 2.29.0