Message ID | 1521041718-32492-3-git-send-email-arushisinghal19971997@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | Boris Brezillon |
Headers | show |
Series | [1/3] mtd: nand: Remove print after allocation failure | expand |
Hi Arushi, On Wed, 14 Mar 2018 21:05:18 +0530 Arushi Singhal <arushisinghal19971997@gmail.com> wrote: > The prints after [k|v][m|z|c]alloc() functions are not needed, because > in case of failure, allocator will print their internal error prints > anyway. > > Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> > --- > drivers/mtd/inftlmount.c | 6 +----- I didn't check but I'm pretty sure you missed some of them here too. > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c > index 8d6bb189..6b94646 100644 > --- a/drivers/mtd/inftlmount.c > +++ b/drivers/mtd/inftlmount.c > @@ -562,12 +562,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
diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c index 8d6bb189..6b94646 100644 --- a/drivers/mtd/inftlmount.c +++ b/drivers/mtd/inftlmount.c @@ -562,12 +562,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
The prints after [k|v][m|z|c]alloc() functions are not needed, because in case of failure, allocator will print their internal error prints anyway. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> --- drivers/mtd/inftlmount.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)