Skip to content

Commit

Permalink
block: Remove redundant initialization of variable ret
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Colin Ian King authored and axboe committed Nov 29, 2021
1 parent eca5892 commit af22fef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/bdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit af22fef

Please sign in to comment.