]> git.hungrycats.org Git - linux/commit
mfd: max77843: Fix max77843_chg_init() return on error
authorJavier Martinez Canillas <javier@osg.samsung.com>
Mon, 21 Sep 2015 12:26:54 +0000 (14:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Oct 2015 00:53:38 +0000 (09:53 +0900)
commit9d8a3e537a511986208db3a887e34408934a7239
treec6782a6059cc3f48f8800d22282355a2469d6031
parent0d6b6d7625050575f3fdc973cc0258ec04c9f401
mfd: max77843: Fix max77843_chg_init() return on error

commit 1b52e50f2a402a266f1ba2281f0a57e87637a047 upstream.

If i2c_new_dummy() fails in max77843_chg_init(), an PTR_ERR(NULL) is
returned which is 0. So the function was wrongly returning a success
value instead of an error code.

Fixes: c7f585fe46d8 ("mfd: max77843: Add max77843 MFD driver core driver")
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mfd/max77843.c