diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/cris/arch-v32/kernel/pinmux.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/cris/arch-v32/kernel/pinmux.c')
-rw-r--r-- | arch/cris/arch-v32/kernel/pinmux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/cris/arch-v32/kernel/pinmux.c b/arch/cris/arch-v32/kernel/pinmux.c index 6eb54ea1c976..f6f3637a4194 100644 --- a/arch/cris/arch-v32/kernel/pinmux.c +++ b/arch/cris/arch-v32/kernel/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); |
@@ -197,7 +197,7 @@ crisv32_pinmux_dealloc(int port, int first_pin, int last_pin) | |||
197 | 197 | ||
198 | crisv32_pinmux_init(); | 198 | crisv32_pinmux_init(); |
199 | 199 | ||
200 | if (port > PORTS) | 200 | if (port > PORTS || port < 0) |
201 | return -EINVAL; | 201 | return -EINVAL; |
202 | 202 | ||
203 | spin_lock_irqsave(&pinmux_lock, flags); | 203 | spin_lock_irqsave(&pinmux_lock, flags); |