From: Patrick Delaunay Date: Fri, 2 Aug 2019 13:08:06 +0200 Subject: [U-Boot] [PATCH v2 5/7] stm32mp1: update sysconf_init on misc_read result In-Reply-To: <1564744088-16896-1-git-send-email-patrick.delaunay@st.com> References: <1564744088-16896-1-git-send-email-patrick.delaunay@st.com> Message-ID: <1564744088-16896-6-git-send-email-patrick.delaunay@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Update management of misc_read in sysconf_init, which now return length of data after the commit 8729b1ae2cbd ("misc: Update read() and write() methods to return bytes xfered") Signed-off-by: Patrick Delaunay --- Changes in v2: None board/st/stm32mp1/stm32mp1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index ca20d85..5ab2226 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -464,7 +464,7 @@ static void sysconf_init(void) } ret = misc_read(dev, STM32_BSEC_SHADOW(18), &otp, 4); - if (!ret) + if (ret > 0) otp = otp & BIT(13); /* get VDD = pwr-supply */ -- 2.7.4