From: Dan Carpenter <dan.carpenter@oracle.com>
To: Boris Brezillon <boris.brezillon@bootlin.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 13:30:47 +0300 [thread overview]
Message-ID: <20180719103047.mdkvovknicvgsama@mwanda> (raw)
In-Reply-To: <20180719094137.22893-1-boris.brezillon@bootlin.com>
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);
^^^^
> goto exit_error;
>
> s3c2410_nand_add_partition(info, nmtd, sets);
> -
> - if (sets != NULL)
> - sets++;
> }
regards,
dan carpenter
next prev parent reply other threads:[~2018-07-19 10:31 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 [this message]
2018-07-19 13:01 ` 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=20180719103047.mdkvovknicvgsama@mwanda \
--to=dan.carpenter@oracle.com \
--cc=boris.brezillon@bootlin.com \
--cc=computersforpeace@gmail.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