lp8727_charger: Add error check routine on probe()
authorKim, Milo <Milo.Kim@ti.com>
Fri, 27 Jan 2012 06:58:30 +0000 (22:58 -0800)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Mon, 26 Mar 2012 16:40:54 +0000 (20:40 +0400)
commit7da6334e73fe3c0579d8c6a56001336a430a5d99
tree3fd627bfeb4a781d7217f3cb40264678b1f24e97
parente39b828f5355e41a8fd24f413fb9dfb81d808397
lp8727_charger: Add error check routine on probe()

Add error checking on initializing registers and interrupt handler.

Initializing registers - lp8727_init_device()
: check i2c error during probing the driver.

Initializing interrupt handler - lp8727_intr_config()
: check an error on creating the irq thread.

If an error occurs on probing lp8727 driver, allocated lp8727 driver memory is freed.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
drivers/power/lp8727_charger.c