diff options
| author | YueHaibing <yuehaibing@huawei.com> | 2018-09-21 09:59:41 +0800 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2018-09-21 09:17:27 -0700 |
| commit | a4925311a5443126ecc90671a1604ea7b0f5b32e (patch) | |
| tree | 13a760d46c326b9787df4bd9dbfa874249d5587a /scripts/patch-kernel | |
| parent | bb8d8466ca25d6851e3e9a703d4db13c84428b43 (diff) | |
| download | cachepc-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
