From: Colin Ian King Date: Fri, 26 Nov 2021 23:06:52 +0000 (+0000) Subject: block: Remove redundant initialization of variable ret X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=af22fef3e7a51cbd339814a0e196086e2bb2aa26;p=linux.git block: Remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20211126230652.1175636-1-colin.i.king@gmail.com Signed-off-by: Jens Axboe --- diff --git a/block/bdev.c b/block/bdev.c index e9ada04e71be0..587645231d60e 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -665,7 +665,7 @@ static void blkdev_flush_mapping(struct block_device *bdev) static int blkdev_get_whole(struct block_device *bdev, fmode_t mode) { struct gendisk *disk = bdev->bd_disk; - int ret = 0; + int ret; if (disk->fops->open) { ret = disk->fops->open(bdev, mode);