Skip to contentSkip to conversation

i3c: renesas: Simplify return statement in 'renesas_i3c_daa'

PATCH Applied Wolfram Sang 3 participants 3 messages Aug 3, 2025 – Sep 14, 2025

Subsystems (2)
lore
Share & tools
lore

Wolfram Sang

author maintainer
#0 lore raw

PATCH 1/1 i3c: renesas: Simplify return statement in 'renesas_i3c_daa'

There was already a bail out for 'ret < 0', so we can always return success at the end of the function.

---
 drivers/i3c/master/renesas-i3c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master/renesas-i3c.c +1 -1
index 174d3dc5d276..275f7b924288 100644
@@ -679,7 +679,7 @@ static int renesas_i3c_daa(struct i3c_master_controller *m)
 			i3c_master_add_i3c_dev_locked(m, i3c->addrs[pos]);
 	}
 
-	return ret < 0 ? ret : 0;
+	return 0;
 }
 
 static bool renesas_i3c_supports_ccc_cmd(struct i3c_master_controller *m,
Signature · 1 line
2.47.2
maintainer Tested-by on v1 1/1
#1 lore raw

Hi Wolfram,
Thanks for your patch!

Quoted 6 lines · Wolfram Sang

There was already a bail out for 'ret < 0', so we can always return success at the end of the function.

Quoted 21 lines
---
 drivers/i3c/master/renesas-i3c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master/renesas-i3c.c +1 -1
index 174d3dc5d276..275f7b924288 100644
@@ -679,7 +679,7 @@ static int renesas_i3c_daa(struct i3c_master_controller *m)
 			i3c_master_add_i3c_dev_locked(m, i3c->addrs[pos]);
 	}
 
-	return ret < 0 ? ret : 0;
+	return 0;
 }
 
 static bool renesas_i3c_supports_ccc_cmd(struct i3c_master_controller *m,
Signature · 1 line
2.47.2

Thanks & Regards,
Tommaso

maintainer Applied
#2 lore raw
In reply to Wolfram Sang
Quoted 4 lines · Wolfram Sang

There was already a bail out for 'ret < 0', so we can always return success at the end of the function.

Applied, thanks!

[1/1] i3c: renesas: Simplify return statement in 'renesas_i3c_daa'

      https://git.kernel.org/i3c/c/b22971d9629f

Best regards,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com