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>
This commit is contained in:
Colin Ian King 2020-04-16 00:08:21 +01:00 committed by Chanwoo Choi
parent 2ef96a5bb1
commit 1fa80f1827
1 changed files with 1 additions and 1 deletions

View File

@ -900,7 +900,7 @@ int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
struct notifier_block *nb)
{
unsigned long flags;
int ret, idx = -EINVAL;
int ret, idx;
if (!edev || !nb)
return -EINVAL;