mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
memory: omap-gpmc: use WARN() instead of BUG() on wrong free
Since driver tracks reserved memory, freeing a non-reserved GPMC should not be fatal and crash the system. Printing a warning is friendlier. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200724182328.3348-9-krzk@kernel.org
This commit is contained in:
parent
1724f1b696
commit
07b6cc4540
@ -1072,8 +1072,7 @@ void gpmc_cs_free(int cs)
|
||||
|
||||
spin_lock(&gpmc_mem_lock);
|
||||
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();
|
||||
WARN(1, "Trying to free non-reserved GPMC CS%d\n", cs);
|
||||
spin_unlock(&gpmc_mem_lock);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user