projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eca5892
)
block: Remove redundant initialization of variable ret
author
Colin Ian King
<colin.i.king@googlemail.com>
Fri, 26 Nov 2021 23:06:52 +0000
(23:06 +0000)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 29 Nov 2021 13:41:29 +0000
(06:41 -0700)
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 <colin.i.king@gmail.com>
Link:
https://lore.kernel.org/r/20211126230652.1175636-1-colin.i.king@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bdev.c
patch
|
blob
|
history
diff --git
a/block/bdev.c
b/block/bdev.c
index e9ada04e71be02fa7d97c83d2ba75e966a561e6a..587645231d60e1ac27c6e913f107f3de5dcdaf80 100644
(file)
--- 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);