OMAP: cs should be positive in gpmc_cs_free()

The index `cs' is signed, test whether it is negative before we release
gpmc_cs_mem[cs].

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by Roel Kluin and committed by Tony Lindgren e7fdc605 d32b20fc

+1 -1
+1 -1
arch/arm/mach-omap2/gpmc.c
··· 378 378 void gpmc_cs_free(int cs) 379 379 { 380 380 spin_lock(&gpmc_mem_lock); 381 - if (cs >= GPMC_CS_NUM || !gpmc_cs_reserved(cs)) { 381 + if (cs >= GPMC_CS_NUM || cs < 0 || !gpmc_cs_reserved(cs)) { 382 382 printk(KERN_ERR "Trying to free non-reserved GPMC CS%d\n", cs); 383 383 BUG(); 384 384 spin_unlock(&gpmc_mem_lock);