From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Arushi Singhal <arushisinghal19971997@gmail.com>
Cc: dwmw2@infradead.org, boris.brezillon@free-electrons.com,
richard@nod.at, linux-kernel@vger.kernel.org,
marek.vasut@gmail.com, linux-mtd@lists.infradead.org,
cyrille.pitchen@wedev4u.fr, computersforpeace@gmail.com
Subject: Re: [PATCH 3/3] mtd: Remove print after allocation failure
Date: Thu, 15 Mar 2018 17:10:06 +0100 [thread overview]
Message-ID: <20180315171006.258edcca@bbrezillon> (raw)
In-Reply-To: <1521041718-32492-3-git-send-email-arushisinghal19971997@gmail.com>
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
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-03-15 16:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 15:35 [PATCH 1/3] mtd: nand: Remove print after allocation failure Arushi Singhal
2018-03-14 15:35 ` [PATCH 2/3] mtd: maps: " Arushi Singhal
2018-03-15 16:07 ` Boris Brezillon
2018-03-14 15:35 ` [PATCH 3/3] mtd: " Arushi Singhal
2018-03-15 16:10 ` Boris Brezillon [this message]
2018-03-15 16:01 ` [PATCH 1/3] mtd: nand: " Boris Brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180315171006.258edcca@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=arushisinghal19971997@gmail.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox