From: Patrick Delaunay Date: Wed, 12 Feb 2020 18:37:35 +0000 (+0100) Subject: board: stm32mp1: update command stboard on misc_write result X-Git-Tag: v2020.07-rc1~41^2~6^2~26 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=16aa3e3fdcd36b9a26be54656c9747fb59f8bb3b;p=oweals%2Fu-boot.git board: stm32mp1: update command stboard on misc_write result 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 Acked-by: Patrice Chotard --- diff --git a/board/st/common/cmd_stboard.c b/board/st/common/cmd_stboard.c index e994a88e71..b740f4510e 100644 --- a/board/st/common/cmd_stboard.c +++ b/board/st/common/cmd_stboard.c @@ -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; }