]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: stm32mp1: update command stboard on misc_write result
authorPatrick Delaunay <patrick.delaunay@st.com>
Wed, 12 Feb 2020 18:37:35 +0000 (19:37 +0100)
committerPatrick Delaunay <patrick.delaunay@st.com>
Tue, 24 Mar 2020 13:05:35 +0000 (14:05 +0100)
Update management of misc_write, 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 <patrick.delaunay@st.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
board/st/common/cmd_stboard.c

index e994a88e717cb379f1b818b09963868a672b5ef6..b740f4510ea54c6b1ff0bb223b5974d0324c2750 100644 (file)
@@ -125,7 +125,7 @@ static int do_stboard(cmd_tbl_t *cmdtp, int flag, int argc,
        ret = misc_write(dev, STM32_BSEC_OTP(BSEC_OTP_BOARD),
                         &otp, sizeof(otp));
 
-       if (ret) {
+       if (ret < 0) {
                puts("BOARD programming error\n");
                return CMD_RET_FAILURE;
        }