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

extcon: remove redundant assignment to variable idx

The variable idx 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>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Colin Ian King and committed by
Chanwoo Choi
1fa80f18 2ef96a5b

+1 -1
+1 -1
drivers/extcon/extcon.c
··· 900 900 struct notifier_block *nb) 901 901 { 902 902 unsigned long flags; 903 - int ret, idx = -EINVAL; 903 + int ret, idx; 904 904 905 905 if (!edev || !nb) 906 906 return -EINVAL;