diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2013-12-07 13:08:53 (GMT) |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-12-12 14:43:36 (GMT) |
commit | 1292e6936658af72c2e585ee8df0b478b4a8c28a (patch) | |
tree | 2884f2c714b198c0533984615d99846785029ff0 | |
parent | c2eb9e7f02118764969c49879c458c9462ccabdc (diff) | |
download | linux-1292e6936658af72c2e585ee8df0b478b4a8c28a.tar.xz |
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: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/pinctrl-at91.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 6446dc8..b0b78f3 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -722,7 +722,8 @@ static int at91_pinconf_get(struct pinctrl_dev *pctldev, unsigned pin; 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)); pin = pin_id % MAX_NB_GPIO_PER_BANK; |