Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: ck804xrom: remove unnecessary oom message

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210610022416.15291-1-thunder.leizhen@huawei.com

authored by

Zhen Lei and committed by
Miquel Raynal
042bf272 bb89d137

+3 -5
+3 -5
drivers/mtd/maps/ck804xrom.c
··· 217 217 unsigned long offset; 218 218 int i; 219 219 220 - if (!map) 221 - map = kmalloc(sizeof(*map), GFP_KERNEL); 222 - 223 220 if (!map) { 224 - printk(KERN_ERR MOD_NAME ": kmalloc failed"); 225 - goto out; 221 + map = kmalloc(sizeof(*map), GFP_KERNEL); 222 + if (!map) 223 + goto out; 226 224 } 227 225 memset(map, 0, sizeof(*map)); 228 226 INIT_LIST_HEAD(&map->list);