From ff6618e9b244ca98c744044123e47986839c5d9b Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Fri, 2 Aug 2019 13:08:06 +0200 Subject: [PATCH] stm32mp1: update sysconf_init on misc_read result 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 --- 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 d994d386b5..95e6078174 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -487,7 +487,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 = vdd-supply */ -- 2.39.5