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

mtd: esb2rom: 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/20210610022239.15238-1-thunder.leizhen@huawei.com

authored by

Zhen Lei and committed by
Miquel Raynal
bb89d137 4883307c

+3 -4
+3 -4
drivers/mtd/maps/esb2rom.c
··· 277 277 unsigned long offset; 278 278 int i; 279 279 280 - if (!map) 281 - map = kmalloc(sizeof(*map), GFP_KERNEL); 282 280 if (!map) { 283 - printk(KERN_ERR MOD_NAME ": kmalloc failed"); 284 - goto out; 281 + map = kmalloc(sizeof(*map), GFP_KERNEL); 282 + if (!map) 283 + goto out; 285 284 } 286 285 memset(map, 0, sizeof(*map)); 287 286 INIT_LIST_HEAD(&map->list);