[PATCH 1/1] board: freescale: vid.c: Add check for return value of adjust_vdd()
Priyanka Singh
priyanka.singh at nxp.com
Mon Nov 2 07:01:20 CET 2020
Add check for return value of adjust_vdd()
Signed-off-by: Priyanka Singh <priyanka.singh at nxp.com>
---
board/freescale/common/vid.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c
index bfd24c43b4..95d7df1e26 100644
--- a/board/freescale/common/vid.c
+++ b/board/freescale/common/vid.c
@@ -931,12 +931,14 @@ static int do_vdd_override(cmd_tbl_t *cmdtp,
char * const argv[])
{
ulong override;
-
+ int ret = 0;
if (argc < 2)
return CMD_RET_USAGE;
if (!strict_strtoul(argv[1], 10, &override))
- adjust_vdd(override); /* the value is checked by callee */
+ ret = adjust_vdd(override); /* the value is checked by callee */
+ if (ret < 0)
+ return CMD_RET_FAILURE;
else
return CMD_RET_USAGE;
return 0;
--
2.17.1
More information about the U-Boot
mailing list