Commit 39f8d63
i2c: iproc: Refactor prototype and remove redundant error checks
The bcm_iproc_i2c_init() always returns 0. As a result, there
is no need to check its return value or handle errors.
This patch changes the prototype of bcm_iproc_i2c_init() to
return void and removes the redundant error handling code after
calls to bcm_iproc_i2c_init() in both the bcm_iproc_i2c_probe()
and bcm_iproc_i2c_resume().
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Link: https://lore.kernel.org/r/20250121084818.2719-1-vulab@iscas.ac.cn
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>1 parent a815975 commit 39f8d63
1 file changed
Lines changed: 3 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
678 | 678 | | |
679 | 679 | | |
680 | 680 | | |
681 | | - | |
| 681 | + | |
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
| |||
706 | 706 | | |
707 | 707 | | |
708 | 708 | | |
709 | | - | |
710 | | - | |
711 | 709 | | |
712 | 710 | | |
713 | 711 | | |
| |||
1081 | 1079 | | |
1082 | 1080 | | |
1083 | 1081 | | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
| 1082 | + | |
1087 | 1083 | | |
1088 | 1084 | | |
1089 | 1085 | | |
| |||
1162 | 1158 | | |
1163 | 1159 | | |
1164 | 1160 | | |
1165 | | - | |
1166 | 1161 | | |
1167 | 1162 | | |
1168 | 1163 | | |
1169 | 1164 | | |
1170 | 1165 | | |
1171 | 1166 | | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
| 1167 | + | |
1175 | 1168 | | |
1176 | 1169 | | |
1177 | 1170 | | |
| |||
0 commit comments