Skip to contentSkip to conversation

extcon: max8997: Delete an unnecessary variable initialisation in max8997_muic_set_path()

PATCH In review SF Markus Elfring 2 participants 2 messages Nov 9, 2017

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

PATCH 1/1 extcon: max8997: Delete an unnecessary variable initialisation in max8997_muic_set_path()

From: Markus Elfring <[email protected]>
Date: Thu, 9 Nov 2017 10:00:08 +0100

The variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning.

---
 drivers/extcon/extcon-max8997.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-max8997.c +1 -1
index 8152790d72e1..9f30f4929b72 100644
@@ -204,7 +204,7 @@ static int max8997_muic_set_debounce_time(struct max8997_muic_info *info,
 static int max8997_muic_set_path(struct max8997_muic_info *info,
 		u8 val, bool attached)
 {
-	int ret = 0;
+	int ret;
 	u8 ctrl1, ctrl2 = 0;
 
 	if (attached)
Signature · 1 line
2.15.0
maintainer
#1 lore raw

Hi,

Quoted 17 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Thu, 9 Nov 2017 10:00:08 +0100

The variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning.

---
 drivers/extcon/extcon-max8997.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-max8997.c +0 -0
index 8152790d72e1..9f30f4929b72 100644

drivers/extcon/extcon-max8997.c static int max8997_muic_set_debounce_time(struct max8997_muic_info *info, · line 210

Quoted 8 lines
drivers/extcon/extcon-max8997.c +1 -1
@@ -204,7 +204,7 @@ static int max8997_muic_set_debounce_time(struct max8997_muic_info *info,
 static int max8997_muic_set_path(struct max8997_muic_info *info,
 		u8 val, bool attached)
 {
-	int ret = 0;
+	int ret;
 	u8 ctrl1, ctrl2 = 0;
 
 	if (attached)

Applied it.
But, it will be merged to v4.16-rc1.

Signature · 3 lines
Best Regards,
Chanwoo Choi
Samsung Electronics