Skip to content
Commit 6fd9c993 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski
Browse files

gpiolib: use gpiochip_dup_line_label() in for_each helpers



Rework for_each_requested_gpio_in_range() to use the new helper to
retrieve a dynamically allocated copy of the descriptor label and free
it at the end of each iteration. We need to leverage the CLASS()'
destructor to make sure that the label is freed even when breaking out
of the loop.

Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 069ced22
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment