* [PATCH] block/drbd: remove redundant initialization to variable rv
@ 2020-05-07 21:47 Colin King
0 siblings, 0 replies; only message in thread
From: Colin King @ 2020-05-07 21:47 UTC (permalink / raw)
To: Philipp Reisner, Lars Ellenberg, Jens Axboe, drbd-dev, linux-block
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable rv is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/block/drbd/drbd_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index c094c3c2c5d4..22dfaa91a89d 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -3522,7 +3522,7 @@ void drbd_uuid_set_bm(struct drbd_device *device, u64 val) __must_hold(local)
*/
int drbd_bmio_set_n_write(struct drbd_device *device) __must_hold(local)
{
- int rv = -EIO;
+ int rv;
drbd_md_set_flag(device, MDF_FULL_SYNC);
drbd_md_sync(device);
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-07 21:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 21:47 [PATCH] block/drbd: remove redundant initialization to variable rv Colin King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).