Skip to contentSkip to conversation

extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set_pat

PATCH Applied SF Markus Elfring 3 participants 3 messages Oct 22, 2017 – Oct 23, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set_pat

From: Markus Elfring <[email protected]>
Date: Sun, 22 Oct 2017 19:39:12 +0200

The variable "ret" is immediately reassigned by a following statement. Thus omit the explicit initialisation at the beginning.

---
 drivers/extcon/extcon-max14577.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-max14577.c +1 -1
index 3d4bf5d23236..a2b60742a228 100644
@@ -204,8 +204,8 @@ static int max14577_muic_set_debounce_time(struct max14577_muic_info *info,
 static int max14577_muic_set_path(struct max14577_muic_info *info,
 		u8 val, bool attached)
 {
-	int ret = 0;
 	u8 ctrl1, ctrl2 = 0;
+	int ret;
 
 	/* Set open state to path before changing hw path */
 	ret = max14577_update_reg(info->max14577->regmap,
Signature · 1 line
2.14.2
maintainer Reviewed-by on v1 2/2
#1 lore raw

Re: [PATCH 2/2] extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set

Quoted 11 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Sun, 22 Oct 2017 19:39:12 +0200

The variable "ret" is immediately reassigned by a following statement. Thus omit the explicit initialisation at the beginning.

---
 drivers/extcon/extcon-max14577.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This should be also sent to [email protected] - the mailing list for this subsysten.

Best regards,
Krzysztof

maintainer Applied
#2 lore raw

Re: [PATCH 2/2] extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set

In reply to SF Markus Elfring
Quoted 17 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Sun, 22 Oct 2017 19:39:12 +0200

The variable "ret" is immediately reassigned by a following statement. Thus omit the explicit initialisation at the beginning.

---
 drivers/extcon/extcon-max14577.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-max14577.c +0 -0
index 3d4bf5d23236..a2b60742a228 100644

drivers/extcon/extcon-max14577.c static int max14577_muic_set_debounce_time(struct max14577_muic_info *info, · line 211

Quoted 9 lines
drivers/extcon/extcon-max14577.c +1 -1
@@ -204,8 +204,8 @@ static int max14577_muic_set_debounce_time(struct max14577_muic_info *info,
 static int max14577_muic_set_path(struct max14577_muic_info *info,
 		u8 val, bool attached)
 {
-	int ret = 0;
 	u8 ctrl1, ctrl2 = 0;
+	int ret;
 
 	/* Set open state to path before changing hw path */
 	ret = max14577_update_reg(info->max14577->regmap,

Applied it. Thanks.

Signature · 3 lines
Best Regards,
Chanwoo Choi
Samsung Electronics