mtd: inftl: remove unnecessary oom message
PATCH 1/1 mtd: inftl: 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 <[email protected]>
--- drivers/mtd/inftlmount.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
drivers/mtd/inftlmount.c +2 -13
@@ -259,20 +259,13 @@ static int find_boot_record(struct INFTLrecord *inftl)/* Memory alloc */ inftl->PUtable =kmalloc_array (inftl->nb_blocks,sizeof (u16),GFP_KERNEL ); -if (!inftl->PUtable) { -printk (KERN_WARNING "INFTL: allocation of PUtable " -"failed (%zd bytes)\n" , - inftl->nb_blocks *sizeof (u16)); +if (!inftl->PUtable)return -ENOMEM ; - } inftl->VUtable =kmalloc_array (inftl->nb_blocks,sizeof (u16),GFP_KERNEL );if (!inftl->VUtable) {kfree (inftl->PUtable); -printk (KERN_WARNING "INFTL: allocation of VUtable " -"failed (%zd bytes)\n" , - inftl->nb_blocks *sizeof (u16));return -ENOMEM ; }
@@ -558,12 +551,8 @@ int INFTL_mount(struct INFTLrecord *s)/* Temporary buffer to store ANAC numbers. */ ANACtable =kcalloc (s->nb_blocks,sizeof (u8),GFP_KERNEL ); -if (!ANACtable) { -printk (KERN_WARNING "INFTL: allocation of ANACtable " -"failed (%zd bytes)\n" , - s->nb_blocks *sizeof (u8)); +if (!ANACtable)return -ENOMEM ; - }/* * First pass is to explore each physical unit, and construct the
Signature · 7 lines
2.26.0.106.g9fadedd ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 6 lines · Zhen Lei
Fixes
scripts/checkpatch.plwarning:
WARNING: Possible unnecessary 'out of memory' messageRemove it can help us save a bit of memory.
Signed-off-by Zhen Lei <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/