Commit 125cda8
staging: gpib: Cleanup allocate_gpios code
The function was using unnecessary variables error and retval.
Simplify the code by testing for failure first and remove the
redundant variables.
Tested-by: Dave Penkler <dpenkler@gmail.com>
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Link: https://lore.kernel.org/r/20250418173434.2892-8-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 427ab51 commit 125cda8
1 file changed
Lines changed: 18 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1123 | 1123 | | |
1124 | 1124 | | |
1125 | 1125 | | |
1126 | | - | |
1127 | | - | |
| 1126 | + | |
1128 | 1127 | | |
1129 | 1128 | | |
1130 | 1129 | | |
| |||
1135 | 1134 | | |
1136 | 1135 | | |
1137 | 1136 | | |
1138 | | - | |
1139 | | - | |
| 1137 | + | |
| 1138 | + | |
1140 | 1139 | | |
1141 | 1140 | | |
1142 | 1141 | | |
| |||
1153 | 1152 | | |
1154 | 1153 | | |
1155 | 1154 | | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
1162 | 1159 | | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
1167 | 1164 | | |
1168 | 1165 | | |
1169 | 1166 | | |
1170 | 1167 | | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
1178 | 1175 | | |
1179 | 1176 | | |
1180 | 1177 | | |
| |||
0 commit comments