diff options
Diffstat (limited to 'arch/cris/arch-v32/mach-fs/pinmux.c')
| -rw-r--r-- | arch/cris/arch-v32/mach-fs/pinmux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/cris/arch-v32/mach-fs/pinmux.c b/arch/cris/arch-v32/mach-fs/pinmux.c index d722ad9ae626..38f29eec14a6 100644 --- a/arch/cris/arch-v32/mach-fs/pinmux.c +++ b/arch/cris/arch-v32/mach-fs/pinmux.c | |||
| @@ -54,7 +54,7 @@ crisv32_pinmux_alloc(int port, int first_pin, int last_pin, enum pin_mode mode) | |||
| 54 | 54 | ||
| 55 | crisv32_pinmux_init(); | 55 | crisv32_pinmux_init(); |
| 56 | 56 | ||
| 57 | if (port > PORTS) | 57 | if (port > PORTS || port < 0) |
| 58 | return -EINVAL; | 58 | return -EINVAL; |
| 59 | 59 | ||
| 60 | spin_lock_irqsave(&pinmux_lock, flags); | 60 | spin_lock_irqsave(&pinmux_lock, flags); |
| @@ -195,7 +195,7 @@ int crisv32_pinmux_dealloc(int port, int first_pin, int last_pin) | |||
| 195 | 195 | ||
| 196 | crisv32_pinmux_init(); | 196 | crisv32_pinmux_init(); |
| 197 | 197 | ||
| 198 | if (port > PORTS) | 198 | if (port > PORTS || port < 0) |
| 199 | return -EINVAL; | 199 | return -EINVAL; |
| 200 | 200 | ||
| 201 | spin_lock_irqsave(&pinmux_lock, flags); | 201 | spin_lock_irqsave(&pinmux_lock, flags); |
