If an error occured during gpio_request_array() then we can get not requested gpio with nonempty garbage "label" field value. Afterward the "gpiolib" command can try to use this nonempty garbage value. This patch prevents this error situation. Signed-off-by: Antony Pavlov <antonynpavlov@xxxxxxxxx> --- drivers/gpio/gpiolib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index b7430b0..5f13d5f 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -94,6 +94,7 @@ void gpio_free(unsigned gpio) gi->requested = false; free(gi->label); + gi->label = NULL; } /** -- 1.8.5.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox