projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d32b20f
)
OMAP: cs should be positive in gpmc_cs_free()
author
Roel Kluin
<
[email protected]
>
Tue, 17 Nov 2009 22:39:06 +0000
(14:39 -0800)
committer
Tony Lindgren
<
[email protected]
>
Wed, 18 Nov 2009 18:34:33 +0000
(10:34 -0800)
The index `cs' is signed, test whether it is negative before we release
gpmc_cs_mem[cs].
Signed-off-by: Roel Kluin <
[email protected]
>
Cc: Russell King <
[email protected]
>
Signed-off-by: Tony Lindgren <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
arch/arm/mach-omap2/gpmc.c
patch
|
blob
|
history
diff --git
a/arch/arm/mach-omap2/gpmc.c
b/arch/arm/mach-omap2/gpmc.c
index f8657568b1baff51eeb6b950de4b35b6088d47c7..f3c992e29651c1c0520a28eb551717537ea82a93 100644
(file)
--- a/
arch/arm/mach-omap2/gpmc.c
+++ b/
arch/arm/mach-omap2/gpmc.c
@@
-378,7
+378,7
@@
EXPORT_SYMBOL(gpmc_cs_request);
void gpmc_cs_free(int cs)
{
spin_lock(&gpmc_mem_lock);
- if (cs >= GPMC_CS_NUM || !gpmc_cs_reserved(cs)) {
+ if (cs >= GPMC_CS_NUM ||
cs < 0 ||
!gpmc_cs_reserved(cs)) {
printk(KERN_ERR "Trying to free non-reserved GPMC CS%d\n", cs);
BUG();
spin_unlock(&gpmc_mem_lock);