mfd: sec-core: Fix I2C dummy device resource leak on probe failure
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Tue, 18 Mar 2014 12:57:50 +0000 (13:57 +0100)
committerLee Jones <lee.jones@linaro.org>
Wed, 19 Mar 2014 09:00:08 +0000 (09:00 +0000)
commit8c66eeced1989c98104783832ab445305fa8c7a3
tree04d24dd2e725a75bf5e234369b5f3846b0f10541
parent53c31b3437a6400c6ffc2c9315680217ad84cb6d
mfd: sec-core: Fix I2C dummy device resource leak on probe failure

Dummy I2C device allocated in sec_pmic_probe() leaked if
devm_regmap_init_i2c() failed. Unregister it before returning from
probe.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/sec-core.c