提交 6e25baab 编写于 作者: M Maninder Singh 提交者: Kishon Vijay Abraham I

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: NVaneet Narang <v.narang@samsung.com>
Signed-off-by: NManinder Singh <maninder1.s@samsung.com>
[cw00.choi : Modify the patch title using the a captical letter for first char]
Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
上级 84c48dc5
...@@ -391,7 +391,7 @@ int extcon_register_notifier(struct extcon_dev *edev, unsigned int id, ...@@ -391,7 +391,7 @@ int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
struct notifier_block *nb) struct notifier_block *nb)
{ {
unsigned long flags; unsigned long flags;
int ret, idx; int ret, idx = -EINVAL;
if (!nb) if (!nb)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册