diff mbox series

[3/4] blk-lib: don't check bdev_get_queue() NULL check

Message ID 20220214100859.9400-4-kch@nvidia.com (mailing list archive)
State New, archived
Headers show
Series [1/4] blk-lib: don't check bdev_get_queue() NULL check | expand

Commit Message

Chaitanya Kulkarni Feb. 14, 2022, 10:08 a.m. UTC
Based on the comment present in the bdev_get_queue()
bdev->bd_disk->queue can never be NULL. Remove the NULL check for the
local variabel q that is set from bdev_get_queue() in the function
__blkdev_issue_write_zeroes() and the respective NULL check.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
 block/blk-lib.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/block/blk-lib.c b/block/blk-lib.c
index 473888d667a1..e7a9ed8cc5df 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -244,10 +244,6 @@  static int __blkdev_issue_write_zeroes(struct block_device *bdev,
 {
 	struct bio *bio = *biop;
 	unsigned int max_write_zeroes_sectors;
-	struct request_queue *q = bdev_get_queue(bdev);
-
-	if (!q)
-		return -ENXIO;
 
 	if (bdev_read_only(bdev))
 		return -EPERM;