Commit 3cafbd4e authored by Devendra Naga's avatar Devendra Naga Committed by MyungJoo Ham

extcon-max8997: remove usage of ret in max8997_muic_handle_charger_type_detach

actually we can do returns with error or success with out ret in this function,
so remove the ret variable, and reduce a very little (4byte) space on stack of this function
Signed-off-by: default avatarDevendra Naga <develkernel412222@gmail.com>
Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
parent 8dee001d
...@@ -271,8 +271,6 @@ static int max8997_muic_handle_adc(struct max8997_muic_info *info, int adc) ...@@ -271,8 +271,6 @@ static int max8997_muic_handle_adc(struct max8997_muic_info *info, int adc)
static int max8997_muic_handle_charger_type_detach( static int max8997_muic_handle_charger_type_detach(
struct max8997_muic_info *info) struct max8997_muic_info *info)
{ {
int ret = 0;
switch (info->pre_charger_type) { switch (info->pre_charger_type) {
case MAX8997_CHARGER_TYPE_USB: case MAX8997_CHARGER_TYPE_USB:
extcon_set_cable_state(info->edev, "USB", false); extcon_set_cable_state(info->edev, "USB", false);
...@@ -290,11 +288,11 @@ static int max8997_muic_handle_charger_type_detach( ...@@ -290,11 +288,11 @@ static int max8997_muic_handle_charger_type_detach(
extcon_set_cable_state(info->edev, "Fast-charger", false); extcon_set_cable_state(info->edev, "Fast-charger", false);
break; break;
default: default:
ret = -EINVAL; return -EINVAL;
break; break;
} }
return ret; return 0;
} }
static int max8997_muic_handle_charger_type(struct max8997_muic_info *info, static int max8997_muic_handle_charger_type(struct max8997_muic_info *info,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment