Commit 5b5d936
leds: ns2: Switch to device_for_each_child_node_scoped()
Switch to device_for_each_child_node_scoped() to simplify the code by
removing the need for calls to fwnode_handle_put() in the error path.
This also prevents possible memory leaks if new error paths are added
without the required call to fwnode_handle_put().
Signed-off-by: Javier Carrasco <[email protected]>
Link: https://lore.kernel.org/r/20240927-leds_device_for_each_child_node_scoped-v1-12-95c0614b38c8@gmail.com
Signed-off-by: Lee Jones <[email protected]>1 parent 4ab3ae4 commit 5b5d936
1 file changed
+2
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | 241 | | |
243 | 242 | | |
244 | 243 | | |
| |||
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
254 | | - | |
| 253 | + | |
255 | 254 | | |
256 | | - | |
257 | | - | |
| 255 | + | |
258 | 256 | | |
259 | | - | |
260 | 257 | | |
261 | 258 | | |
262 | 259 | | |
| |||
0 commit comments