aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2021-11-26 23:06:52 +0000
committerJens Axboe <[email protected]>2021-11-29 06:41:29 -0700
commitaf22fef3e7a51cbd339814a0e196086e2bb2aa26 (patch)
treed58f6135129b9164469eeb869eafe42ff9746d54
parenteca5892a5d616d39185d652820931f21cab2f190 (diff)
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--block/bdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bdev.c b/block/bdev.c
index e9ada04e71be..587645231d60 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);