From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
miquel.raynal@bootlin.com
Cc: richard@nod.at, vigneshr@ti.com, boris.brezillon@collabora.com,
tudor.ambarus@microchip.com, linux-mtd@lists.infradead.org,
linux-kernel@vger.kernel.org, dan.carpenter@oracle.com,
martin@kaiser.cx
Subject: Re: [PATCH] mtd: rawnand: Fix probe failure due to of_get_nand_secure_regions()
Date: Fri, 6 Aug 2021 21:45:50 +0200 [thread overview]
Message-ID: <20210806194550.392325-1-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20210727062813.32619-1-manivannan.sadhasivam@linaro.org>
On Tue, 2021-07-27 at 06:28:13 UTC, Manivannan Sadhasivam wrote:
> Due to 14f97f0b8e2b, the rawnand platforms without "secure-regions"
> property defined in DT fails to probe. The issue is,
> of_get_nand_secure_regions() errors out if
> of_property_count_elems_of_size() returns a negative error code.
>
> If the "secure-regions" property is not present in DT, then also we'll
> get -EINVAL from of_property_count_elems_of_size() but it should not
> be treated as an error for platforms not declaring "secure-regions"
> in DT.
>
> So fix this behaviour by checking for the existence of that property in
> DT and return 0 if it is not present.
>
> Fixes: 14f97f0b8e2b ("mtd: rawnand: Add a check in of_get_nand_secure_regions()")
> Reported-by: Martin Kaiser <martin@kaiser.cx>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Reviewed-by: Martin Kaiser <martin@kaiser.cx>
> Tested-by: Martin Kaiser <martin@kaiser.cx>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks.
Miquel
prev parent reply other threads:[~2021-08-06 19:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 6:28 [PATCH] mtd: rawnand: Fix probe failure due to of_get_nand_secure_regions() Manivannan Sadhasivam
2021-07-27 16:13 ` Martin Kaiser
2021-08-06 19:45 ` Miquel Raynal [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=20210806194550.392325-1-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=boris.brezillon@collabora.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin@kaiser.cx \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.com \
/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).