1
0
Fork 0

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>
hifive-unleashed-5.1
Maninder Singh 2016-08-01 14:51:30 +05:30 committed by Chanwoo Choi
parent 912465bcf8
commit 2c8116a111
1 changed files with 1 additions and 1 deletions

View File

@ -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;