linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpiolib: change gpio pin from unsigned to signed in acpi callback
@ 2015-04-09 22:25 qipeng.zha
  2015-04-10  7:43 ` Mika Westerberg
  2015-04-27 13:21 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: qipeng.zha @ 2015-04-09 22:25 UTC (permalink / raw)
  To: linux-gpio; +Cc: linus.walleij, mika.westerberg, qipeng.zha, Alan Cox

From: "qipeng.zha" <qipeng.zha@intel.com>

The signed error will be wrongly used as valid gpio offset

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: qipeng.zha <qipeng.zha@intel.com>
---
 drivers/gpio/gpiolib-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index df990f2..9674066 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -550,7 +550,7 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,
 
 	length = min(agpio->pin_table_length, (u16)(pin_index + bits));
 	for (i = pin_index; i < length; ++i) {
-		unsigned pin = agpio->pin_table[i];
+		int pin = agpio->pin_table[i];
 		struct acpi_gpio_connection *conn;
 		struct gpio_desc *desc;
 		bool found;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-27 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-09 22:25 [PATCH] gpiolib: change gpio pin from unsigned to signed in acpi callback qipeng.zha
2015-04-10  7:43 ` Mika Westerberg
2015-04-27 13:21 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).