Commit 61c6375d authored by Michal Nazarewicz's avatar Michal Nazarewicz Committed by Linus Walleij

gpio: fix memory leak in error path

Signed-off-by: default avatarMichal Nazarewicz <>
Signed-off-by: Linus Walleij's avatarLinus Walleij <>
parent 0c8aab8e
......@@ -1354,8 +1354,10 @@ int gpiochip_add_pingroup_range(struct gpio_chip *chip,
ret = pinctrl_get_group_pins(pctldev, pin_group,
if (ret < 0)
if (ret < 0) {
return ret;
pinctrl_add_gpio_range(pctldev, &pin_range->range);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment