diff options
| author | YueHaibing <[email protected]> | 2018-09-21 09:59:41 +0800 |
|---|---|---|
| committer | Linus Walleij <[email protected]> | 2018-09-21 09:17:27 -0700 |
| commit | a4925311a5443126ecc90671a1604ea7b0f5b32e (patch) | |
| tree | 13a760d46c326b9787df4bd9dbfa874249d5587a /tools/perf/scripts/python/failed-syscalls-by-pid.py | |
| parent | bb8d8466ca25d6851e3e9a703d4db13c84428b43 (diff) | |
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 <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions