summaryrefslogtreecommitdiffstats
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-09-21 09:59:41 +0800
committerLinus Walleij <linus.walleij@linaro.org>2018-09-21 09:17:27 -0700
commita4925311a5443126ecc90671a1604ea7b0f5b32e (patch)
tree13a760d46c326b9787df4bd9dbfa874249d5587a /scripts/patch-kernel
parentbb8d8466ca25d6851e3e9a703d4db13c84428b43 (diff)
downloadcachepc-linux-a4925311a5443126ecc90671a1604ea7b0f5b32e.tar.gz
cachepc-linux-a4925311a5443126ecc90671a1604ea7b0f5b32e.zip
pinctrl: sunxi: fix 'pctrl->functions' allocation in sunxi_pinctrl_build_state
fixes following Smatch static check warning: ./drivers/pinctrl/sunxi/pinctrl-sunxi.c:1112 sunxi_pinctrl_build_state() warn: passing devm_ allocated variable to kfree. 'pctrl->functions' As we will be calling krealloc() on pointer 'pctrl->functions', which means kfree() will be called in there, devm_kzalloc() shouldn't be used with the allocation in the first place. Fix the warning by calling kcalloc() and managing the free procedure in error path on our own. Fixes: 0e37f88d9ad8 ("ARM: sunxi: Add pinctrl driver for Allwinner SoCs") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions