i3c: master: Remove ternary operator on return statement
Subsystems (3)
PATCH 1/1 i3c: master: Remove ternary operator on return statement
The value of ret at the end of the function renesas_i3c_daa is always zero since previous checks for less than zero have already exited via return paths. Hence the final ternary operator checking for a less than zero value for ret is redundant and can be removed.
Signed-off-by Colin Ian King <[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.51.0
Wolfram Sang
maintainerQuoted 6 lines · Colin Ian King
The value of ret at the end of the function
renesas_i3c_daais always zero since previous checks for less than zero have already exited via return paths. Hence the final ternary operator checking for a less than zero value for ret is redundant and can be removed.Signed-off-by Colin Ian King <[email protected]>
Already sent (and applied just today):