From: Johan Hovold Date: Mon, 4 May 2015 15:23:25 +0000 (+0200) Subject: gpio: fix gpio leak in gpiochip_add error path X-Git-Tag: omap-for-v4.3/legacy-v2-signed~305^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d86750ce62391f5a0a7985d5c050c2e3c823ab9;p=pandora-kernel.git 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: f625d4601759 ("gpio: add GPIO hogging mechanism") Signed-off-by: Johan Hovold Reviewed-by: Alexandre Courbot Signed-off-by: Linus Walleij --- Reading git-diff-tree failed