mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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: Devendra Naga <develkernel412222@gmail.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
This commit is contained in:
parent
8dee001d98
commit
3cafbd4e50
@ -271,8 +271,6 @@ out:
|
||||
static int max8997_muic_handle_charger_type_detach(
|
||||
struct max8997_muic_info *info)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
switch (info->pre_charger_type) {
|
||||
case MAX8997_CHARGER_TYPE_USB:
|
||||
extcon_set_cable_state(info->edev, "USB", false);
|
||||
@ -290,11 +288,11 @@ static int max8997_muic_handle_charger_type_detach(
|
||||
extcon_set_cable_state(info->edev, "Fast-charger", false);
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
return -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int max8997_muic_handle_charger_type(struct max8997_muic_info *info,
|
||||
|
Loading…
Reference in New Issue
Block a user