Commit 82ab754
soundwire: qcom: Use guard to avoid mixing cleanup and goto
qcom_swrm_stream_alloc_ports() already uses cleanup.h but also has goto.
Such combination is error-prone and discouraged:
"... and that the "goto" statement can jump between scopes, the
expectation is that usage of "goto" and cleanup helpers is never mixed
in the same function."
Actually simplify the code with a guard which allows to fix the
discouraged style by removing the goto.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251201102627.146182-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>1 parent f87e557 commit 82ab754
1 file changed
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1228 | 1228 | | |
1229 | 1229 | | |
1230 | 1230 | | |
1231 | | - | |
| 1231 | + | |
1232 | 1232 | | |
1233 | 1233 | | |
1234 | 1234 | | |
| |||
1246 | 1246 | | |
1247 | 1247 | | |
1248 | 1248 | | |
1249 | | - | |
| 1249 | + | |
| 1250 | + | |
1250 | 1251 | | |
1251 | 1252 | | |
1252 | 1253 | | |
| |||
1272 | 1273 | | |
1273 | 1274 | | |
1274 | 1275 | | |
1275 | | - | |
1276 | | - | |
| 1276 | + | |
1277 | 1277 | | |
1278 | 1278 | | |
1279 | 1279 | | |
| |||
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
1288 | | - | |
1289 | | - | |
1290 | 1288 | | |
1291 | | - | |
| 1289 | + | |
1292 | 1290 | | |
1293 | 1291 | | |
1294 | 1292 | | |
| |||
0 commit comments