Commit 873cc55
mmc: core: Simplify with scoped for each OF child loop
Use scoped for-each loop when iterating over device nodes to simplify the
code, but also to ensure the device node reference is automatically
released when the loop scope ends.
Signed-off-by: Hans Zhang <18255117159@163.com>
Reviewed-by: Shawn Lin <shawn.lin@linux.dev>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>1 parent 5fa0e32 commit 873cc55
1 file changed
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 228 | + | |
| 229 | + | |
233 | 230 | | |
234 | | - | |
235 | | - | |
236 | 231 | | |
237 | 232 | | |
238 | 233 | | |
| |||
0 commit comments