extcon-max8997: remove usage of ret in max8997_muic_handle_charger_type_detach
Quoted 2 lines
any comments ?
Sorry for replying late.
It has been applied to the extcon-for-next tree at
http://git.infradead.org/users/kmpark/linux-samsung/shortlog/refs/heads/extcon-for-next
, which will appear in hours.
Quoted 34 lines
Quoted 32 lines · Devendra Naga
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 <[email protected]>---
compile tested.drivers/extcon/extcon-max8997.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/extcon/extcon-max8997.c +1
-3@@ -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 ; }
Quoted 14 lines
Quoted 8 lines
drivers/extcon/extcon-max8997.c +1
-2-return ret; +return 0 ; } static int max8997_muic_handle_charger_type(struct max8997_muic_info *info, --1.7.12.rc2
�淸�{.n�+돴윯돪�+%듚�깁負쪐w��{.n�+돴쪐{깸G쳺��{ay����,j�f"톒쉹��묎�z_溫(�쉸듶줷"얎�m����G쳺�◀?솳鈺�&x�~뤳턨O뺞촾퇉v�^�m����띠�◀?뻀�
Quoted 8 lines · MyungJoo Ham
Quoted 2 lines
any comments ?
Sorry for replying late.
It has been applied to the extcon-for-next tree at
http://git.infradead.org/users/kmpark/linux-samsung/shortlog/refs/heads/extcon-for-next
, which will appear in hours.
Thanks!