]> git.karo-electronics.de Git - linux-beck.git/commit
pinctrl/abx500: prevent error path from corrupting returning error
authorLee Jones <lee.jones@linaro.org>
Thu, 31 Jan 2013 11:06:33 +0000 (11:06 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 6 Feb 2013 21:38:31 +0000 (22:38 +0100)
commitfa1ec996ac1a42e46ec7dca089252f124c81d7bd
treef426273718c901003868953b3e76137a8e9d493d
parentd8a7c1f134edda4ac17a99fffc1159a65a3866a7
pinctrl/abx500: prevent error path from corrupting returning error

Prior to this patch abx500_gpio_probe() would return the return-value
of gpiochip_remove() during its error patch regardless of what the
actual failure was. So as long as gpiochip_remove() succeeded, probe()
would look like it succeeded too.

This patch ensures the correct error value is returned and that
mutex_destroy() is invoked if gpiochip_add_pin_range() were to fail.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-abx500.c