]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
stm32mp1: update test on misc_read result
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 2 Aug 2019 11:08:05 +0000 (13:08 +0200)
committerPatrice Chotard <patrice.chotard@st.com>
Tue, 27 Aug 2019 09:19:23 +0000 (11:19 +0200)
Update the stm32mp1 baord after the commit 8729b1ae2cbd
("misc: Update read() and write() methods to return bytes xfered")

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
board/st/stm32mp1/stm32mp1.c

index 654c48940bd37c8e5eaf49697f85af0352c2b9fd..d994d386b58ac197d1a5eb8b6c814bd3894e21d4 100644 (file)
@@ -103,7 +103,7 @@ int checkboard(void)
        if (!ret)
                ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD),
                                &otp, sizeof(otp));
-       if (!ret && otp) {
+       if (ret > 0 && otp) {
                printf("Board: MB%04x Var%d Rev.%c-%02d\n",
                       otp >> 16,
                       (otp >> 12) & 0xF,