linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: boris.brezillon@free-electrons.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mtd/nand/atmel: Delete an error message for a failed memory allocation in two functions
Date: Mon, 8 Jan 2018 09:33:37 +0100	[thread overview]
Message-ID: <20180108093337.3a9cb292@bbrezillon> (raw)
In-Reply-To: <20180108091831.64d54599@bbrezillon>

On Mon, 8 Jan 2018 09:18:31 +0100
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> [private message]

Oops, not so private :-).

> Hi Wenyou,
> 
> On Mon, 8 Jan 2018 08:58:21 +0800
> "Yang, Wenyou" <Wenyou.Yang@Microchip.com> wrote:
> 
> > On 2018/1/6 4:55, SF Markus Elfring wrote:  
> > > From: Markus Elfring <elfring@users.sourceforge.net>
> > > Date: Fri, 5 Jan 2018 21:45:04 +0100
> > >
> > > Omit an extra message for a memory allocation failure in these functions.
> > >
> > > This issue was detected by using the Coccinelle software.
> > >
> > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> > > ---    
> > 
> > Acked-by: Wenyou Yang <wenyou.yang@microchip.com>  
> 
> Please don't encourage Markus to send more patches. The MTD maintainers
> (like other maintainers) have decided to ignore his contributions.
> 
> If you want to know why, just google his name and you should have a
> pretty good idea.
> 
> Thanks,
> 
> Boris
> 
> > >   drivers/mtd/nand/atmel/nand-controller.c | 8 ++------
> > >   1 file changed, 2 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/mtd/nand/atmel/nand-controller.c b/drivers/mtd/nand/atmel/nand-controller.c
> > > index 90a71a56bc23..a41b999229c9 100644
> > > --- a/drivers/mtd/nand/atmel/nand-controller.c
> > > +++ b/drivers/mtd/nand/atmel/nand-controller.c
> > > @@ -1612,10 +1612,8 @@ static int atmel_nand_register(struct atmel_nand *nand)
> > >   		mtd->name = devm_kasprintf(nc->dev, GFP_KERNEL,
> > >   					   "%s:nand.%d", dev_name(nc->dev),
> > >   					   nand->cs[0].id);
> > > -		if (!mtd->name) {
> > > -			dev_err(nc->dev, "Failed to allocate mtd->name\n");
> > > +		if (!mtd->name)
> > >   			return -ENOMEM;
> > > -		}
> > >   	}
> > >   
> > >   	ret = nand_scan_tail(mtd);
> > > @@ -1654,10 +1652,8 @@ static struct atmel_nand *atmel_nand_create(struct atmel_nand_controller *nc,
> > >   	nand = devm_kzalloc(nc->dev,
> > >   			    sizeof(*nand) + (numcs * sizeof(*nand->cs)),
> > >   			    GFP_KERNEL);
> > > -	if (!nand) {
> > > -		dev_err(nc->dev, "Failed to allocate NAND object\n");
> > > +	if (!nand)
> > >   		return ERR_PTR(-ENOMEM);
> > > -	}
> > >   
> > >   	nand->numcs = numcs;
> > >       
> > 
> > Best Regards,
> > Wenyou Yang  
> 

      reply	other threads:[~2018-01-08  8:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 20:55 [PATCH] mtd/nand/atmel: Delete an error message for a failed memory allocation in two functions SF Markus Elfring
2018-01-08  0:58 ` Yang, Wenyou
2018-01-08  8:18   ` Boris Brezillon
2018-01-08  8:33     ` Boris Brezillon [this message]

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=20180108093337.3a9cb292@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).