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

Priyanka Jain priyanka.jain at nxp.com
Mon Dec 7 11:39:33 CET 2020


>-----Original Message-----
>From: Priyanka Singh <priyanka.singh at nxp.com>
>Sent: Wednesday, November 25, 2020 2:59 PM
>To: u-boot at lists.denx.de
>Cc: Priyanka Jain <priyanka.jain at nxp.com>; Biwen Li <biwen.li at nxp.com>;
>Priyanka Singh <priyanka.singh at nxp.com>
>Subject: [PATCH v2 1/1] board: freescale: vid.c: Add check for return value of
>adjust_vdd()
>
>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

Incomplete patch. Please include changes of previous version of patch as well.

Regards
Priyanka


More information about the U-Boot mailing list