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

mfd: max14577: Remove redundant initialization of variable current_bits

The variable current_bits 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>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Colin Ian King and committed by
Lee Jones
1f0fa85c 594f1935

+1 -1
+1 -1
drivers/mfd/max14577.c
··· 61 61 int maxim_charger_calc_reg_current(const struct maxim_charger_current *limits, 62 62 unsigned int min_ua, unsigned int max_ua, u8 *dst) 63 63 { 64 - unsigned int current_bits = 0xf; 64 + unsigned int current_bits; 65 65 66 66 if (min_ua > max_ua) 67 67 return -EINVAL;