[PATCH v2 1/1] board: freescale: vid.c: Add check for return value of adjust_vdd()

Priyanka Singh priyanka.singh at nxp.com
Wed Nov 25 10:28:46 CET 2020


From: Biwen Li <biwen.li at nxp.com>

Add check for return value of adjust_vdd()

---
Changes for v2:
	-Add parantheses to fix build warning

Signed-off-by: Priyanka Singh <priyanka.singh at nxp.com>
Signed-off-by: Biwen Li <biwen.li at nxp.com>
---
 board/freescale/common/vid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c
index d02d91cdef..0256d035eb 100644
--- a/board/freescale/common/vid.c
+++ b/board/freescale/common/vid.c
@@ -971,11 +971,11 @@ static int do_vdd_override(cmd_tbl_t *cmdtp,
 	if (argc < 2)
 		return CMD_RET_USAGE;
 
-	if (!strict_strtoul(argv[1], 10, &override))
+	if (!strict_strtoul(argv[1], 10, &override)) {
 		ret = adjust_vdd(override);   /* the value is checked by callee */
 		if (ret < 0)
 			return CMD_RET_FAILURE;
-	else
+	} else
 		return CMD_RET_USAGE;
 	return 0;
 }
-- 
2.17.1



More information about the U-Boot mailing list