summaryrefslogtreecommitdiff
path: root/drivers/extcon
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-04-16 00:08:21 +0100
committerChanwoo Choi <cw00.choi@samsung.com>2020-05-29 17:36:01 +0900
commit1fa80f182794bbefe8f1bffd74abda5470cdd973 (patch)
tree4be2a46b81b421440a21acc70f51768c6a7060a2 /drivers/extcon
parent2ef96a5bb12be62ef75b5828c0aab838ebb29cb8 (diff)
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>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 2dfbfec572f9..0a6438cbb3f3 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -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;