linux-stable/drivers/pinctrl
Gaosheng Cui aae4846e8e pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions()
[ Upstream commit 83e1bcaf8c ]

The thunderbay_add_functions() will free memory of thunderbay_funcs
when everything is ok, but thunderbay_funcs will not be freed when
thunderbay_add_functions() fails, then there will be a memory leak,
so we need to add kfree() when thunderbay_add_functions() fails to
fix it.

In addition, doing some cleaner works, moving kfree(funcs) from
thunderbay_add_functions() to thunderbay_build_functions().

Fixes: 12422af819 ("pinctrl: Add Intel Thunder Bay pinctrl driver")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Reviewed-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20221129120126.1567338-1-cuigaosheng1@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:32:23 +01:00
..
actions
aspeed pinctrl: aspeed: Force to disable the function's signal 2022-08-31 14:14:31 +02:00
bcm These are the pin control changes for the v6.1 kernel cycle: 2022-10-11 10:59:59 -07:00
berlin pinctrl: berlin: fix spelling typo in comment 2022-09-05 14:10:14 +02:00
cirrus
freescale pinctrl: imx8m: kconfig: Fix build error on test compile 2022-09-08 10:06:57 +02:00
intel pinctrl: intel: Save and restore pins in "direct IRQ" mode 2022-11-28 21:41:31 +01:00
mediatek pinctrl: mediatek: fix the pinconf register offset of some pins 2022-12-31 13:32:10 +01:00
meson pinctrl: meson: Switch to use fwnode instead of of_node 2022-09-08 10:35:30 +02:00
mvebu pinctrl: armada-37xx: Remove unused macro PIN_GRP() 2022-08-22 10:46:25 +02:00
nomadik pinctrl: nomadik: remove dead code after DB8540 pinctrl removal 2022-09-19 09:35:57 +02:00
nuvoton pinctrl: wpcm450: Correct the fwnode_irq_get() return value check 2022-10-04 09:40:57 +02:00
pxa
qcom pinctrl: qcom: sc8280xp: Rectify UFS reset pins 2022-11-08 15:03:24 +01:00
ralink pinctrl: ralink: Check for null return of devm_kcalloc 2022-07-11 14:40:17 +02:00
renesas Pin control bulk changes for v6.0: 2022-08-10 11:01:44 -07:00
samsung pinctrl: samsung: Finish initializing the gpios before registering them 2022-08-16 12:23:30 +03:00
spear
sprd
starfive pinctrl: starfive: Rename "pinctrl-starfive" to "pinctrl-starfive-jh7100" 2022-10-04 10:47:48 +02:00
stm32 pinctrl: stm32: Switch to use dev_err_probe() helper 2022-09-20 11:16:42 +02:00
sunplus pinctrl: sunplus: Add check for kcalloc 2022-07-11 15:04:19 +02:00
sunxi These are the pin control changes for the v6.1 kernel cycle: 2022-10-11 10:59:59 -07:00
tegra pinctrl: tegra: tegra194: drop unused pin groups 2022-05-04 23:40:05 +02:00
ti
uniphier
visconti
vt8500
core.c pinctrl: core: Use device_match_of_node() helper 2022-07-18 11:38:37 +02:00
core.h
devicetree.c pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map 2022-11-10 12:26:18 +01:00
devicetree.h
Kconfig These are the pin control changes for the v6.1 kernel cycle: 2022-10-11 10:59:59 -07:00
Makefile pinctrl: Create subdirectory for StarFive drivers 2022-10-04 10:42:11 +02:00
pinconf-generic.c pinctrl: pinconf-generic: add missing of_node_put() 2022-12-31 13:32:16 +01:00
pinconf.c
pinconf.h
pinctrl-amd.c Interrupt subsystem updates: 2022-10-12 10:23:24 -07:00
pinctrl-amd.h pinctrl: amd: Implement pinmux functionality 2022-06-15 15:54:20 +02:00
pinctrl-apple-gpio.c pinctrl: apple: Use a raw spinlock for the regmap 2022-05-25 09:37:44 +02:00
pinctrl-artpec6.c
pinctrl-as3722.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE 2022-06-10 14:51:36 +02:00
pinctrl-at91-pio4.c pinctrl: at91-pio4: remove #ifdef CONFIG_PM_SLEEP 2022-07-18 11:38:36 +02:00
pinctrl-at91.c pinctrl: at91: use dev_dbg() instead of printk() 2022-09-03 00:19:23 +02:00
pinctrl-at91.h
pinctrl-axp209.c pinctrl: axp209: Support the AXP221/AXP223/AXP809 variant 2022-06-30 14:05:57 +02:00
pinctrl-bm1880.c
pinctrl-cy8c95x0.c pinctrl: cy8c95x0: Align function names in cy8c95x0_pmxops 2022-09-20 11:22:12 +02:00
pinctrl-da850-pupd.c
pinctrl-da9062.c
pinctrl-digicolor.c
pinctrl-equilibrium.c pinctrl: equilibrium: Switch to use fwnode instead of of_node 2022-05-09 13:46:51 +02:00
pinctrl-equilibrium.h pinctrl: equilibrium: Switch to use fwnode instead of of_node 2022-05-09 13:46:51 +02:00
pinctrl-falcon.c
pinctrl-gemini.c
pinctrl-ingenic.c pinctrl: Ingenic: JZ4755 bug fixes 2022-10-17 11:47:38 +02:00
pinctrl-k210.c pinctrl: k210: call of_node_put() 2022-12-31 13:32:14 +01:00
pinctrl-keembay.c
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-lpc18xx.c
pinctrl-max77620.c pinctrl: max77620: drop unneeded MODULE_ALIAS 2022-04-22 22:56:46 +02:00
pinctrl-mcp23s08.c pinctrl: mcp23s08: Drop assignment of default number of OF cells 2022-09-03 00:17:35 +02:00
pinctrl-mcp23s08.h
pinctrl-mcp23s08_i2c.c
pinctrl-mcp23s08_spi.c
pinctrl-microchip-sgpio.c These are the pin control changes for the v6.1 kernel cycle: 2022-10-11 10:59:59 -07:00
pinctrl-ocelot.c pinctrl: ocelot: add missing destroy_workqueue() in error path in ocelot_pinctrl_probe() 2022-12-31 13:32:02 +01:00
pinctrl-oxnas.c
pinctrl-palmas.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE 2022-06-10 14:51:36 +02:00
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c pinctrl: pistachio: Correct the fwnode_irq_get() return value check 2022-09-08 15:18:58 +02:00
pinctrl-rk805.c
pinctrl-rockchip.c pinctrl: rockchip: list all pins in a possible mux route for PX30 2022-11-07 15:39:38 +01:00
pinctrl-rockchip.h pinctrl: rockchip: Add RV1126 pinctrl support 2022-08-22 09:51:08 +02:00
pinctrl-single.c pinctrl: single: Fix potential division by zero 2022-11-21 14:41:52 +01:00
pinctrl-st.c pinctrl: st: stop abusing of_get_named_gpio() 2022-10-04 09:58:17 +02:00
pinctrl-stmfx.c
pinctrl-sx150x.c
pinctrl-tb10x.c
pinctrl-thunderbay.c pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions() 2022-12-31 13:32:23 +01:00
pinctrl-utils.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE 2022-06-10 14:51:36 +02:00
pinctrl-utils.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE 2022-06-10 14:51:36 +02:00
pinctrl-xway.c
pinctrl-zynq.c pinctrl: zynq: use module_platform_driver to simplify the code 2022-03-15 01:46:13 +01:00
pinctrl-zynqmp.c Revert "pinctrl: pinctrl-zynqmp: Add support for output-enable and bias-high-impedance" 2022-10-18 09:50:29 +02:00
pinmux.c
pinmux.h