summaryrefslogtreecommitdiff
path: root/arch/cris/arch-v32/mach-a3/pinmux.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/arch-v32/mach-a3/pinmux.c')
-rw-r--r--arch/cris/arch-v32/mach-a3/pinmux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/cris/arch-v32/mach-a3/pinmux.c b/arch/cris/arch-v32/mach-a3/pinmux.c
index 0a28c9bedfb7..18648ef2d874 100644
--- a/arch/cris/arch-v32/mach-a3/pinmux.c
+++ b/arch/cris/arch-v32/mach-a3/pinmux.c
@@ -242,7 +242,7 @@ crisv32_pinmux_dealloc(int port, int first_pin, int last_pin)
crisv32_pinmux_init();
- if (port > PORTS)
+ if (port > PORTS || port < 0)
return -EINVAL;
spin_lock_irqsave(&pinmux_lock, flags);