Skip to content
Commit 6d86750c authored by Johan Hovold's avatar Johan Hovold Committed by Linus Walleij
Browse files

gpio: fix gpio leak in gpiochip_add error path



Make sure to free any hogged gpios on errors in gpiochip_add.

Also move all forward declarations to the top of the file.

Fixes: f625d460 ("gpio: add GPIO hogging mechanism")
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 030bbdbf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment