Commit e7fdc605 authored by Roel Kluin's avatar Roel Kluin Committed by Tony Lindgren
Browse files

OMAP: cs should be positive in gpmc_cs_free()

The index `cs' is signed, test whether it is negative before we release
Signed-off-by: default avatarRoel Kluin <>
Cc: Russell King <>
Signed-off-by: Tony Lindgren's avatarTony Lindgren <>
Signed-off-by: default avatarAndrew Morton <>
parent d32b20fc
......@@ -378,7 +378,7 @@ EXPORT_SYMBOL(gpmc_cs_request);
void gpmc_cs_free(int cs)
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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment