UBUNTU: SAUCE: gpio: aggregator: Fix leak in gpio_aggregator_parse()
BugLink: https://bugs.launchpad.net/bugs/2103496 Call gpio_aggregator_free_lines() before returning on this error path. Fixes: 83c8e3df642f ("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> (cherry picked from commit d945ff52642d98eb6fa191f88a9cfde729129395 gpio/for-next) Signed-off-by: Koichiro Den<koichiro.den@canonical.com> Acked-by: Jacob Martin <jacob.martin@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
acfd2edb01
commit
2cd2989123
@@ -1087,7 +1087,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) {
|
||||
|
||||
Reference in New Issue
Block a user