pinctrl: imx8ulp: Initialize pin_reg
The initialization of pin_reg is missing, causing the following build
warning:
drivers/pinctrl/freescale/pinctrl-imx8ulp.c:228:35: warning: 'pin_reg' is used uninitialized in this function [-Wuninitialized]
Initialize pin_reg the same way as it is done on vf610 and imx7ulp
to fix the problem.
Fixes: 16b343e8e0
("pinctrl: imx8ulp: Add pinctrl driver support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210723203242.88845-1-festevam@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
79e2311c87
commit
af0ca06f87
@ -225,6 +225,10 @@ static int imx8ulp_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
|
||||
const struct imx_pin_reg *pin_reg;
|
||||
u32 reg;
|
||||
|
||||
pin_reg = &ipctl->pin_regs[offset];
|
||||
if (pin_reg->mux_reg == -1)
|
||||
return -EINVAL;
|
||||
|
||||
reg = readl(ipctl->base + pin_reg->mux_reg);
|
||||
if (input)
|
||||
reg = (reg & ~BM_OBE_ENABLED) | BM_IBE_ENABLED;
|
||||
|
Loading…
Reference in New Issue
Block a user