diff options
| author | Haotian Zhang <vulab@iscas.ac.cn> | 2025-10-31 10:16:20 +0800 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2025-11-13 13:51:12 +0000 |
| commit | 03865dd8af52eb16c38062df2ed30a91b604780e (patch) | |
| tree | e38e393cb90843c2c8db4f3acf85ad7c5e09632b /tools/lib/python/feat/parse_features.py | |
| parent | 434959618c47efe9e5f2e20f4a850caac4f6b823 (diff) | |
leds: netxbig: Fix GPIO descriptor leak in error paths
The function netxbig_gpio_ext_get() acquires GPIO descriptors but
fails to release them when errors occur mid-way through initialization.
The cleanup callback registered by devm_add_action_or_reset() only
runs on success, leaving acquired GPIOs leaked on error paths.
Add goto-based error handling to release all acquired GPIOs before
returning errors.
Fixes: 9af512e81964 ("leds: netxbig: Convert to use GPIO descriptors")
Suggested-by: Markus Elfring <Markus.Elfring@web.de>
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251031021620.781-1-vulab@iscas.ac.cn
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'tools/lib/python/feat/parse_features.py')
0 files changed, 0 insertions, 0 deletions
