linux/drivers/pinctrl/sunxi
YueHaibing a4925311a5 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: 0e37f88d9a ("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>
2018-09-21 09:17:27 -07:00
..
Kconfig pinctrl: sunxi: add support for H6 R_PIO pin controller 2018-05-16 14:19:13 +02:00
Makefile pinctrl: sunxi: add support for H6 R_PIO pin controller 2018-05-16 14:19:13 +02:00
pinctrl-sun4i-a10.c pinctrl: sunxi: fix a typo when merging A20 support to A10 driver 2017-12-28 15:06:01 +01:00
pinctrl-sun5i.c pinctrl: sunxi: Disable strict mode for old pinctrl drivers 2017-10-31 09:45:00 +01:00
pinctrl-sun6i-a31-r.c pinctrl: sunxi: Disable strict mode for old pinctrl drivers 2017-10-31 09:45:00 +01:00
pinctrl-sun6i-a31.c pinctrl: sunxi: Disable strict mode for old pinctrl drivers 2017-10-31 09:45:00 +01:00
pinctrl-sun8i-a23-r.c pinctrl: sunxi: Disable strict mode for old pinctrl drivers 2017-10-31 09:45:00 +01:00
pinctrl-sun8i-a23.c pinctrl: sunxi: Disable strict mode for old pinctrl drivers 2017-10-31 09:45:00 +01:00
pinctrl-sun8i-a33.c pinctrl: sunxi: change irq_bank_base to irq_bank_map 2018-03-27 15:07:49 +02:00
pinctrl-sun8i-a83t-r.c pinctrl: sunxi: Add support for A83T R_PIO 2017-06-09 11:20:32 +02:00
pinctrl-sun8i-a83t.c pinctrl: sunxi: Fix SPDIF function name for A83T 2017-05-23 11:30:56 +02:00
pinctrl-sun8i-h3-r.c pinctrl: sunxi: Disable strict mode for old pinctrl drivers 2017-10-31 09:45:00 +01:00
pinctrl-sun8i-h3.c pinctrl: sunxi: Disable strict mode for old pinctrl drivers 2017-10-31 09:45:00 +01:00
pinctrl-sun8i-v3s.c pinctrl: sunxi: change irq_bank_base to irq_bank_map 2018-03-27 15:07:49 +02:00
pinctrl-sun9i-a80-r.c pinctrl: sunxi: Disable strict mode for old pinctrl drivers 2017-10-31 09:45:00 +01:00
pinctrl-sun9i-a80.c pinctrl: sunxi: Fix A80 interrupt pin bank 2017-11-30 16:47:37 +01:00
pinctrl-sun50i-a64-r.c pinctrl: sunxi: Add A64 R_PIO controller support 2017-03-14 14:42:24 +01:00
pinctrl-sun50i-a64.c pinctrl: sunxi: Fix A64 UART mux value 2017-11-30 16:48:54 +01:00
pinctrl-sun50i-h5.c pinctrl: sunxi: Disable strict mode for H5 driver 2017-11-30 16:50:43 +01:00
pinctrl-sun50i-h6-r.c pinctrl: sunxi: add support for H6 R_PIO pin controller 2018-05-16 14:19:13 +02:00
pinctrl-sun50i-h6.c pinctrl: sunxi: add support for the Allwinner H6 main pin controller 2018-03-27 15:09:42 +02:00
pinctrl-sunxi.c pinctrl: sunxi: fix 'pctrl->functions' allocation in sunxi_pinctrl_build_state 2018-09-21 09:17:27 -07:00
pinctrl-sunxi.h pinctrl: sunxi: change irq_bank_base to irq_bank_map 2018-03-27 15:07:49 +02:00