mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 17:28:56 +00:00
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
@ -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)
|
||||
{
|
||||
if (gpio > MAX_BLACKFIN_GPIOS)
|
||||
if (gpio >= MAX_BLACKFIN_GPIOS)
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user