Skip to contentSkip to conversation

media: tc358743: Remove unnecessary self assignment

PATCH In review Nathan Chancellor 2 participants 2 messages Oct 8, 2018 – Oct 9, 2018

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

PATCH 1/1 media: tc358743: Remove unnecessary self assignment

Clang warns when a variable is assigned to itself.

drivers/media/i2c/tc358743.c:1921:7: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]

                ret = ret;
                ~~~ ^ ~~~

1 warning generated.

---
 drivers/media/i2c/tc358743.c | 1 -
 1 file changed, 1 deletion(-)
drivers/media/i2c/tc358743.c +0 -1
index ca5d92942820..41d470d9ca94 100644
@@ -1918,7 +1918,6 @@ static int tc358743_probe_of(struct tc358743_state *state)
 	ret = v4l2_fwnode_endpoint_alloc_parse(of_fwnode_handle(ep), &endpoint);
 	if (ret) {
 		dev_err(dev, "failed to parse endpoint\n");
-		ret = ret;
 		goto put_node;
 	}
 
Signature · 1 line
2.19.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Nathan,

Thank you for the patch,

Quoted 9 lines · Nathan Chancellor

Clang warns when a variable is assigned to itself.

drivers/media/i2c/tc358743.c:1921:7: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]

                ret = ret;
                ~~~ ^ ~~~

1 warning generated.

Certainly somewhat redundant.

Quoted 17 lines
---
 drivers/media/i2c/tc358743.c | 1 -
 1 file changed, 1 deletion(-)
drivers/media/i2c/tc358743.c +0 -1
index ca5d92942820..41d470d9ca94 100644
@@ -1918,7 +1918,6 @@ static int tc358743_probe_of(struct tc358743_state *state)
 	ret = v4l2_fwnode_endpoint_alloc_parse(of_fwnode_handle(ep), &endpoint);
 	if (ret) {
 		dev_err(dev, "failed to parse endpoint\n");
-		ret = ret;
 		goto put_node;
 	}