[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1436185889-773-1-git-send-email-rogerq@ti.com>
Date: Mon, 6 Jul 2015 15:31:29 +0300
From: Roger Quadros <rogerq@...com>
To: <cw00.choi@...sung.com>
CC: <linux-omap@...r.kernel.org>, <linux-usb@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Roger Quadros <rogerq@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH] extcon: Fix kernel hang for find_cable_index_by_name() users
Users of find_cable_index_by_name() will cause a kernel hang
as the while loop counter is never incremented and end condition
is never reached.
Fixes: commit 73b6ecdb93e8 ("extcon: Redefine the unique id of supported external connectors without 'enum extcon' type")
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Roger Quadros <rogerq@...com>
---
drivers/extcon/extcon.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 76157ab..1acc830 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -138,6 +138,8 @@ static int find_cable_index_by_name(struct extcon_dev *edev, const char *name)
id = i;
break;
}
+
+ i++;
}
if (id == EXTCON_NONE)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists