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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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_same().

Signed-off-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>
---
 block/blk-lib.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/block/blk-lib.c b/block/blk-lib.c
index 08ac56eb3a70..473888d667a1 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -169,9 +169,6 @@ static int __blkdev_issue_write_same(struct block_device *bdev, sector_t sector,
 	struct bio *bio = *biop;
 	sector_t bs_mask;
 
-	if (!q)
-		return -ENXIO;
-
 	if (bdev_read_only(bdev))
 		return -EPERM;
 
-- 
2.29.0




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux