From: Xu Wang Date: Fri, 19 Mar 2021 08:11:13 +0000 (+0000) Subject: dm thin: remove needless request_queue NULL pointer check X-Git-Tag: accepted/tizen/unified/20230118.172025~7316^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=695902bb2e17baf10a5a312ef048b71f738ddbe8;p=platform%2Fkernel%2Flinux-rpi.git dm thin: remove needless request_queue NULL pointer check Since commit ff9ea323816d ("block, bdi: an active gendisk always has a request_queue associated with it") the request_queue pointer returned from bdev_get_queue() shall never be NULL. Signed-off-by: Xu Wang Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index fff4c50..985baee 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -2816,7 +2816,7 @@ static bool data_dev_supports_discard(struct pool_c *pt) { struct request_queue *q = bdev_get_queue(pt->data_dev->bdev); - return q && blk_queue_discard(q); + return blk_queue_discard(q); } static bool is_factor(sector_t block_size, uint32_t n)