gpiolib: change gpio pin from unsigned to signed in acpi callback

The signed error will be wrongly used as valid gpio offset

Reported-by: David Binderman <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Qipeng Zha <[email protected]>
Acked-by: Mika Westerberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
Qipeng Zha 2015-04-10 06:25:10 +08:00 • committed by Linus Walleij
commit a4811622fe

View file

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