From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Richard Weinberger <richard@nod.at>,
Miquel Raynal <miquel.raynal@bootlin.com>,
linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>
Subject: Re: [PATCH] mtd: rawnand: s3c2410: Error out when ->nrsets < 0 or ->sets == NULL
Date: Thu, 19 Jul 2018 15:01:27 +0200 [thread overview]
Message-ID: <20180719150127.4b331299@bbrezillon> (raw)
In-Reply-To: <20180719103047.mdkvovknicvgsama@mwanda>
On Thu, 19 Jul 2018 13:30:47 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Thu, Jul 19, 2018 at 11:41:37AM +0200, Boris Brezillon wrote:
> > @@ -1152,7 +1157,7 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)
> >
> > nmtd = info->mtds;
> >
> > - for (setno = 0; setno < nr_sets; setno++, nmtd++) {
> > + for (setno = 0; setno < nr_sets; setno++, nmtd++, sets++) {
> > struct mtd_info *mtd = nand_to_mtd(&nmtd->chip);
> >
> > pr_debug("initialising set %d (%p, info %p)\n",
> > @@ -1174,9 +1179,6 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)
>
> Can you also remove the NULL check from int the middle of the loop:
>
> err = nand_scan_ident(mtd, (sets) ? sets->nr_chips : 1, NULL);
Sure.
> ^^^^
>
> > goto exit_error;
> >
> > s3c2410_nand_add_partition(info, nmtd, sets);
> > -
> > - if (sets != NULL)
> > - sets++;
> > }
>
> regards,
> dan carpenter
>
prev parent reply other threads:[~2018-07-19 13:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-19 9:41 [PATCH] mtd: rawnand: s3c2410: Error out when ->nrsets < 0 or ->sets == NULL Boris Brezillon
2018-07-19 10:30 ` Dan Carpenter
2018-07-19 13:01 ` 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=20180719150127.4b331299@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=computersforpeace@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@bootlin.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