diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 13:06:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 13:06:09 -0500 |
commit | 8098a7ef8946169cf8ffeb6f4d8130fc3651192e (patch) | |
tree | 90d2da5a7340a1cbaf5f779986d733a900b88f15 /arch/cris/arch-v32/kernel/pinmux.c | |
parent | 4805a1b0e6d74feb6428c05116a2886a076ee341 (diff) | |
parent | d8fe989e7368a26e4baf9acb55524c71e5c3a117 (diff) |
Merge branch 'for-linus' of git://repo.or.cz/cris-mirror
* 'for-linus' of git://repo.or.cz/cris-mirror:
cris: Fixup last users of irq_chip->typename
CRIS v32: Should index be positive?
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); |