pinctrl: axp209: Fix NULL pointer dereference after allocation
authorAnton Vasilyev <vasilyev@ispras.ru>
Mon, 6 Aug 2018 16:06:35 +0000 (19:06 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 10 Aug 2018 21:12:43 +0000 (23:12 +0200)
commit504c76979bccec66e4c2e41f6a006e49e284466f
tree3382955b0359f03dd734682295b2bd628e339d9b
parent01f1974e5f08732de6cecc4287788a99cfc3b325
pinctrl: axp209: Fix NULL pointer dereference after allocation

There is no check that allocation in axp20x_funcs_groups_from_mask
is successful.
The patch adds corresponding check and return values.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-axp209.c