LFU-145 imx8qxp_val: Fix uninitialized gpio variable
authorYe Li <ye.li@nxp.com>
Thu, 27 May 2021 07:59:06 +0000 (00:59 -0700)
committerYe Li <ye.li@nxp.com>
Thu, 27 May 2021 12:02:34 +0000 (05:02 -0700)
Fix coverity Issue: 13562326 Uninitialized scalar variable
The flags field of struct gpio_desc is not initialized. When calling
dm_gpio_set_dir_flags, the flags field will be used.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
board/freescale/imx8qxp_val/imx8qxp_val.c

index dc4afa8..b747fed 100644 (file)
@@ -338,6 +338,7 @@ static void board_gpio_init(void)
 
        desc.dev = dev;
        desc.offset = 19;
+       desc.flags = 0;
 
        ret = dm_gpio_request(&desc, "ioexp_rst");
        if (ret) {