pinctrl: check ops->pin_config_set in pinconf_set_config()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 4 Aug 2017 02:59:32 +0000 (11:59 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 14 Aug 2017 13:01:59 +0000 (15:01 +0200)
commit17a512486bab646109770f6577396810e83acfbb
treed7221d679df9c278338266c55a15408b25985860
parent75bb10b479c33a8e15ab99d6f35a141e86df8547
pinctrl: check ops->pin_config_set in pinconf_set_config()

pinconf_set_config() is called by pinctrl_gpio_set_config().
If a GPIO driver is backed by a pinctrl driver and it does not
support .pin_config_set() hook, it causes NULL pointer dereference.

Fixes: 15381bc7c7f5 ("pinctrl: Allow configuration of pins from gpiolib based drivers")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinconf.c