diff options
author | Devendra Naga <develkernel412222@gmail.com> | 2012-08-31 04:30:19 -0400 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2012-10-21 22:28:10 -0400 |
commit | 3cafbd4e5005dbef78b32f2e0fe3ab00a955c6c1 (patch) | |
tree | 2a60407f22f28bd90b88867611d21ea9a7bbdbb5 /drivers/extcon | |
parent | 8dee001d98813c4cfa0be92ae3da7cabdc954c63 (diff) |
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>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-max8997.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index ef9090a4271d..77b66b0cc8f5 100644 --- a/drivers/extcon/extcon-max8997.c +++ b/drivers/extcon/extcon-max8997.c | |||
@@ -271,8 +271,6 @@ out: | |||
271 | static int max8997_muic_handle_charger_type_detach( | 271 | static int max8997_muic_handle_charger_type_detach( |
272 | struct max8997_muic_info *info) | 272 | struct max8997_muic_info *info) |
273 | { | 273 | { |
274 | int ret = 0; | ||
275 | |||
276 | switch (info->pre_charger_type) { | 274 | switch (info->pre_charger_type) { |
277 | case MAX8997_CHARGER_TYPE_USB: | 275 | case MAX8997_CHARGER_TYPE_USB: |
278 | extcon_set_cable_state(info->edev, "USB", false); | 276 | extcon_set_cable_state(info->edev, "USB", false); |
@@ -290,11 +288,11 @@ static int max8997_muic_handle_charger_type_detach( | |||
290 | extcon_set_cable_state(info->edev, "Fast-charger", false); | 288 | extcon_set_cable_state(info->edev, "Fast-charger", false); |
291 | break; | 289 | break; |
292 | default: | 290 | default: |
293 | ret = -EINVAL; | 291 | return -EINVAL; |
294 | break; | 292 | break; |
295 | } | 293 | } |
296 | 294 | ||
297 | return ret; | 295 | return 0; |
298 | } | 296 | } |
299 | 297 | ||
300 | static int max8997_muic_handle_charger_type(struct max8997_muic_info *info, | 298 | static int max8997_muic_handle_charger_type(struct max8997_muic_info *info, |