In the TB10x pin database, a port index of -1 is used to indicate
unmuxed GPIO pin groups. This bug fixes a 'cast to unsigned' bug of
this value.
Thanks to Dan Carpenter for highlighting this.
CC: Dan Carpenter <[email protected]>
Signed-off-by: Christian Ruppert <[email protected]>
---
drivers/pinctrl/pinctrl-tb10x.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-tb10x.c b/drivers/pinctrl/pinctrl-tb10x.c
index c5e0f69..26ca685 100644
--- a/drivers/pinctrl/pinctrl-tb10x.c
+++ b/drivers/pinctrl/pinctrl-tb10x.c
@@ -629,9 +629,8 @@ static int tb10x_gpio_request_enable(struct pinctrl_dev *pctl,
*/
for (i = 0; i < state->pinfuncgrpcnt; i++) {
const struct tb10x_pinfuncgrp *pfg = &state->pingroups[i];
- unsigned int port = pfg->port;
unsigned int mode = pfg->mode;
- int j;
+ int j, port = pfg->port;
/*
* Skip pin groups which are always mapped and don't need
--
1.7.1
On Fri, Apr 11, 2014 at 4:46 PM, Christian Ruppert
<[email protected]> wrote:
> In the TB10x pin database, a port index of -1 is used to indicate
> unmuxed GPIO pin groups. This bug fixes a 'cast to unsigned' bug of
> this value.
>
> Thanks to Dan Carpenter for highlighting this.
>
> CC: Dan Carpenter <[email protected]>
> Signed-off-by: Christian Ruppert <[email protected]>
Patch applied for fixes.
Yours,
Linus Walleij