pinctrl: sunxi: Fix potential null pointer dereference
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 30 May 2014 10:20:52 +0000 (15:50 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 19 Jun 2014 07:34:56 +0000 (09:34 +0200)
commitbd07894e217b174361711320be50c8308456096d
treec641beb3279edfca46b9d9619ece020449d47914
parent7171511eaec5bf23fb06078f59784a3a0626b38f
pinctrl: sunxi: Fix potential null pointer dereference

kzalloc can fail. Add a null check to avoid null pointer
dereference error while accessing the pointer later.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sunxi/pinctrl-sunxi.c