diff options
author | Maninder Singh <maninder1.s@samsung.com> | 2016-08-01 14:51:30 +0530 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2016-09-10 16:48:50 +0530 |
commit | 6e25baab5a0b2af2ebeb1d817ef94b11fc465fbd (patch) | |
tree | 30189a873faa93f5d1b3d5daad6d798c5987abcc /drivers/extcon | |
parent | 84c48dc55945b4edfb63388832ebcca82d003ee7 (diff) | |
download | linux-stable-6e25baab5a0b2af2ebeb1d817ef94b11fc465fbd.tar.gz linux-stable-6e25baab5a0b2af2ebeb1d817ef94b11fc465fbd.tar.bz2 linux-stable-6e25baab5a0b2af2ebeb1d817ef94b11fc465fbd.zip |
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.c | 2 |
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, struct notifier_block *nb) { unsigned long flags; - int ret, idx; + int ret, idx = -EINVAL; if (!nb) return -EINVAL; |