Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

block: drbd: drbd_receiver: Remove redundant assignment to err

Variable err is set to '-EIO' but this value is never read as
it is overwritten or not used later on, hence it is a redundant
assignment and can be removed.

Clean up the following clang-analyzer warning:

drivers/block/drbd/drbd_receiver.c:3955:5: warning: Value stored to
'err' is never read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Link: https://lore.kernel.org/r/20220406190715.1938174-4-christoph.boehmwalder@linbit.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Jiapeng Chong and committed by
Jens Axboe
e1838cf0 4b28f3b4

-1
-1
drivers/block/drbd/drbd_receiver.c
··· 3902 3902 drbd_err(device, "verify-alg of wrong size, " 3903 3903 "peer wants %u, accepting only up to %u byte\n", 3904 3904 data_size, SHARED_SECRET_MAX); 3905 - err = -EIO; 3906 3905 goto reconnect; 3907 3906 } 3908 3907