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 654c489..d994d38 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,