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 2/3] mtd: maps: Remove print after allocation failure
Date: Thu, 15 Mar 2018 17:07:02 +0100 [thread overview]
Message-ID: <20180315170702.552c4756@bbrezillon> (raw)
In-Reply-To: <1521041718-32492-2-git-send-email-arushisinghal19971997@gmail.com>
Hi Arushi,
On Wed, 14 Mar 2018 21:05:17 +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/maps/sun_uflash.c | 4 +---
And here as well some of the drivers are still printing error messages
after mem allocation failures (amd76xrom, ck804xrom, esb2rom, ichxrom,
vmu-flash).
Regards,
Boris
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
> index 1e73bba..80a253c 100644
> --- a/drivers/mtd/maps/sun_uflash.c
> +++ b/drivers/mtd/maps/sun_uflash.c
> @@ -62,10 +62,8 @@ int uflash_devinit(struct platform_device *op, struct device_node *dp)
> }
>
> up = kzalloc(sizeof(struct uflash_dev), GFP_KERNEL);
> - if (!up) {
> - printk(KERN_ERR PFX "Cannot allocate struct uflash_dev\n");
> + if (!up)
> return -ENOMEM;
> - }
>
> /* copy defaults and tweak parameters */
> memcpy(&up->map, &uflash_map_templ, sizeof(uflash_map_templ));
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-03-15 16:08 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 [this message]
2018-03-14 15:35 ` [PATCH 3/3] mtd: " Arushi Singhal
2018-03-15 16:10 ` Boris Brezillon
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=20180315170702.552c4756@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;
as well as URLs for NNTP newsgroup(s).