From: Zhen Lei Date: Thu, 10 Jun 2021 02:01:30 +0000 (+0800) Subject: mtd: nftl: remove unnecessary oom message X-Git-Tag: v5.15~799^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ef029135c7b4e1ed4c424efe5cbd8d0088fe8ba;p=platform%2Fkernel%2Flinux-starfive.git mtd: nftl: 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 Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610020130.14917-1-thunder.leizhen@huawei.com --- diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c index fd331bc..75e86ed 100644 --- a/drivers/mtd/nftlmount.c +++ b/drivers/mtd/nftlmount.c @@ -188,17 +188,14 @@ device is already correct. /* memory alloc */ nftl->EUNtable = kmalloc_array(nftl->nb_blocks, sizeof(u16), GFP_KERNEL); - if (!nftl->EUNtable) { - printk(KERN_NOTICE "NFTL: allocation of EUNtable failed\n"); + if (!nftl->EUNtable) return -ENOMEM; - } nftl->ReplUnitTable = kmalloc_array(nftl->nb_blocks, sizeof(u16), GFP_KERNEL); if (!nftl->ReplUnitTable) { kfree(nftl->EUNtable); - printk(KERN_NOTICE "NFTL: allocation of ReplUnitTable failed\n"); return -ENOMEM; }