i3c: renesas: Simplify return statement in 'renesas_i3c_daa'
Subsystems (2)
Wolfram Sang
maintainerPATCH 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.
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Wolfram Sang <[email protected]>
--- drivers/i3c/master/renesas-i3c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master/renesas-i3c.c +1 -1
@@ -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
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.
Reported-by Dan Carpenter <[email protected]>Signed-off-by Wolfram Sang <[email protected]>
Tested-by Tommaso Merciai <[email protected]>
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@@ -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
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