From: Patrick Delaunay Date: Fri, 2 Aug 2019 13:08:07 +0200 Subject: [U-Boot] [PATCH v2 6/7] stm32mp1: board update command stboard on misc_read result In-Reply-To: <1564744088-16896-1-git-send-email-patrick.delaunay@st.com> References: <1564744088-16896-1-git-send-email-patrick.delaunay@st.com> Message-ID: <1564744088-16896-7-git-send-email-patrick.delaunay@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Update management of misc_read, 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 --- Changes in v2: - impact in added command stboard after rebase board/st/stm32mp1/cmd_stboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/st/stm32mp1/cmd_stboard.c b/board/st/stm32mp1/cmd_stboard.c index f781c36..04352ae 100644 --- a/board/st/stm32mp1/cmd_stboard.c +++ b/board/st/stm32mp1/cmd_stboard.c @@ -60,7 +60,7 @@ static int do_stboard(cmd_tbl_t *cmdtp, int flag, int argc, ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD), &otp, sizeof(otp)); - if (ret) { + if (ret < 0) { puts("OTP read error"); return CMD_RET_FAILURE; } -- 2.7.4