From: Colin Ian King Date: Wed, 15 Apr 2020 23:08:21 +0000 (+0100) Subject: extcon: remove redundant assignment to variable idx X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1fa80f182794bbefe8f1bffd74abda5470cdd973;p=linux.git 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 Signed-off-by: Chanwoo Choi --- diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c index 2dfbfec572f96..0a6438cbb3f30 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;