Blackfin arch: As Mike pointed out range goes form m..MAX_BLACKFIN_GPIO -1
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
This commit is contained in:
parent
00163e869e
commit
e7613aab91
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INT
|
||||||
|
|
||||||
inline int check_gpio(unsigned short gpio)
|
inline int check_gpio(unsigned short gpio)
|
||||||
{
|
{
|
||||||
if (gpio > MAX_BLACKFIN_GPIOS)
|
if (gpio >= MAX_BLACKFIN_GPIOS)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue