gpio: max732x: Fix I2C dummy device resource leak on probe failure
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Thu, 6 Mar 2014 09:31:15 +0000 (10:31 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 12 Mar 2014 13:48:13 +0000 (14:48 +0100)
In max732x_probe() driver allocates dummy I2C device (if number of ports
is greater than 8) however it is not unregistered if probe fails later.
Fix the leak by unregistering dummy I2C device if it was allocated.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-max732x.c

Simple merge