mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
gpio: aggregator: Fix leak in gpio_aggregator_parse()
Call gpio_aggregator_free_lines() before returning on this error path.
Fixes: 83c8e3df64 ("gpio: aggregator: expose aggregator created via legacy sysfs to configfs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Koichiro Den <koichiro.den@canonical.com>
Link: https://lore.kernel.org/r/e023bfe52509ce1bef6209ec7c47e99279c551dd.1744452787.git.dan.carpenter@linaro.org
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
This commit is contained in:
parent
05b43de95a
commit
d945ff5264
|
|
@ -1101,7 +1101,7 @@ static int gpio_aggregator_parse(struct gpio_aggregator *aggr)
|
|||
error = bitmap_parselist(offsets, bitmap, AGGREGATOR_MAX_GPIOS);
|
||||
if (error) {
|
||||
pr_err("Cannot parse %s: %d\n", offsets, error);
|
||||
return error;
|
||||
goto err;
|
||||
}
|
||||
|
||||
for_each_set_bit(i, bitmap, AGGREGATOR_MAX_GPIOS) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user