提交 1292e693 编写于 作者: A Alexandre Belloni 提交者: Linus Walleij

pinctrl: at91: initialize config parameter to 0

When passing a not initialized config parameter, at91_pinconf_get() would return
a bogus value. Fix that by initializing it to zero before using it.
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 c2eb9e7f
...@@ -722,7 +722,8 @@ static int at91_pinconf_get(struct pinctrl_dev *pctldev, ...@@ -722,7 +722,8 @@ static int at91_pinconf_get(struct pinctrl_dev *pctldev,
unsigned pin; unsigned pin;
int div; int div;
dev_dbg(info->dev, "%s:%d, pin_id=%d, config=0x%lx", __func__, __LINE__, pin_id, *config); *config = 0;
dev_dbg(info->dev, "%s:%d, pin_id=%d", __func__, __LINE__, pin_id);
pio = pin_to_controller(info, pin_to_bank(pin_id)); pio = pin_to_controller(info, pin_to_bank(pin_id));
pin = pin_id % MAX_NB_GPIO_PER_BANK; pin = pin_id % MAX_NB_GPIO_PER_BANK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册