aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorManinder Singh <maninder1.s@samsung.com>2016-08-01 05:21:30 -0400
committerChanwoo Choi <cw00.choi@samsung.com>2016-08-07 21:58:37 -0400
commit2c8116a1110a93f298b10339d773fb055a0c04d7 (patch)
tree052f7588c2212036ff16f899748780ae814dcac8 /drivers/extcon
parent912465bcf869660900cf77c4761869048f3ff063 (diff)
extcon: Fix compile time warning
This patch fixes below compilation warning:- drivers/extcon/extcon.c: In function extcon_register_notifier: drivers/extcon/extcon.c:455:6: warning: idx may be used uninitialized in this function [-Wmaybe-uninitialized] if (idx >= 0) { Signed-off-by: Vaneet Narang <v.narang@samsung.com> Signed-off-by: Maninder Singh <maninder1.s@samsung.com> [cw00.choi : Modify the patch title using the a captical letter for first char] 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 5b61000cde26..9a266e5c7e10 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -391,7 +391,7 @@ int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
391 struct notifier_block *nb) 391 struct notifier_block *nb)
392{ 392{
393 unsigned long flags; 393 unsigned long flags;
394 int ret, idx; 394 int ret, idx = -EINVAL;
395 395
396 if (!nb) 396 if (!nb)
397 return -EINVAL; 397 return -EINVAL;