Skip to content

Commit

Permalink
pinctrl/TB10x: Fix signedness bug
Browse files Browse the repository at this point in the history
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 <dan.carpenter@oracle.com>
Signed-off-by: Christian Ruppert <christian.ruppert@abilis.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Christian Ruppert authored and Linus Walleij committed Apr 22, 2014
1 parent a798c10 commit 4c5fba3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pinctrl/pinctrl-tb10x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c5fba3

Please sign in to comment.