]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: core: Warn about NULL gpio_chip in pinctrl_ready_for_gpio_range()
authorTony Lindgren <tony@atomide.com>
Thu, 3 Sep 2015 17:34:30 +0000 (10:34 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 14 Sep 2015 07:13:43 +0000 (09:13 +0200)
commit8895e8d3b1e2301afd950f979aebd979b53db963
tree838d42b5eb8cb93c3284649b8afe461a57cb1394
parent360d10cd4e3cfa9fb572d390cd286007dfb059c7
pinctrl: core: Warn about NULL gpio_chip in pinctrl_ready_for_gpio_range()

If the gpio driver is confused about the numbers for gpio-ranges,
pinctrl_ready_for_gpio_range() may get called with invalid GPIO
causing a NULL pointer exception. Let's instead provide a warning
that allows fixing the problem and return with error.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/core.c