Skip to content

Commit 1fa80f1

Browse files
Colin Ian Kingchanwoochoi
authored andcommitted
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>
1 parent 2ef96a5 commit 1fa80f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/extcon/extcon.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
900900
struct notifier_block *nb)
901901
{
902902
unsigned long flags;
903-
int ret, idx = -EINVAL;
903+
int ret, idx;
904904

905905
if (!edev || !nb)
906906
return -EINVAL;

0 commit comments

Comments
 (0)