power: max77693: fix simple_return.cocci warnings
authorkbuild test robot <fengguang.wu@intel.com>
Wed, 21 Jan 2015 04:11:34 +0000 (12:11 +0800)
committerSebastian Reichel <sre@kernel.org>
Wed, 21 Jan 2015 13:02:30 +0000 (14:02 +0100)
drivers/power/max77693_charger.c:615:1-4: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/max77693_charger.c

index 56cf2177aad48aecf9775ecf830717cfff8be08d..841047cb9ff1e0cea19f8ee76a97f7ce17701833 100644 (file)
@@ -612,12 +612,8 @@ static int max77693_reg_init(struct max77693_charger *chg)
        if (ret)
                return ret;
 
-       ret = max77693_set_charge_input_threshold_volt(chg,
+       return max77693_set_charge_input_threshold_volt(chg,
                        chg->charge_input_threshold_volt);
-       if (ret)
-               return ret;
-
-       return 0;
 }
 
 #ifdef CONFIG_OF