Commit 828ed786 authored by Zhen Lei's avatar Zhen Lei Committed by Miquel Raynal

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: default avatarZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210610022850.15397-1-thunder.leizhen@huawei.com
parent 3d2fac0e
...@@ -259,20 +259,13 @@ static int find_boot_record(struct INFTLrecord *inftl) ...@@ -259,20 +259,13 @@ static int find_boot_record(struct INFTLrecord *inftl)
/* Memory alloc */ /* Memory alloc */
inftl->PUtable = kmalloc_array(inftl->nb_blocks, sizeof(u16), inftl->PUtable = kmalloc_array(inftl->nb_blocks, sizeof(u16),
GFP_KERNEL); GFP_KERNEL);
if (!inftl->PUtable) { if (!inftl->PUtable)
printk(KERN_WARNING "INFTL: allocation of PUtable "
"failed (%zd bytes)\n",
inftl->nb_blocks * sizeof(u16));
return -ENOMEM; return -ENOMEM;
}
inftl->VUtable = kmalloc_array(inftl->nb_blocks, sizeof(u16), inftl->VUtable = kmalloc_array(inftl->nb_blocks, sizeof(u16),
GFP_KERNEL); GFP_KERNEL);
if (!inftl->VUtable) { if (!inftl->VUtable) {
kfree(inftl->PUtable); kfree(inftl->PUtable);
printk(KERN_WARNING "INFTL: allocation of VUtable "
"failed (%zd bytes)\n",
inftl->nb_blocks * sizeof(u16));
return -ENOMEM; return -ENOMEM;
} }
...@@ -558,12 +551,8 @@ int INFTL_mount(struct INFTLrecord *s) ...@@ -558,12 +551,8 @@ int INFTL_mount(struct INFTLrecord *s)
/* Temporary buffer to store ANAC numbers. */ /* Temporary buffer to store ANAC numbers. */
ANACtable = kcalloc(s->nb_blocks, sizeof(u8), GFP_KERNEL); ANACtable = kcalloc(s->nb_blocks, sizeof(u8), GFP_KERNEL);
if (!ANACtable) { if (!ANACtable)
printk(KERN_WARNING "INFTL: allocation of ANACtable "
"failed (%zd bytes)\n",
s->nb_blocks * sizeof(u8));
return -ENOMEM; return -ENOMEM;
}
/* /*
* First pass is to explore each physical unit, and construct the * First pass is to explore each physical unit, and construct the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment