Commit 7e8e4fc
PCI: kirin: Convert kirin_pcie_parse_port() to scoped iterator
Convert loops in kirin_pcie_parse_port() to use the _scoped() version of
for_each_available_child_of_node() so the refcounts of children are
implicitly decremented when the loop is exited.
No functional change intended here, but it will make future error exits
from these loops easier.
Link: https://lore.kernel.org/linux-pci/20240609-pcie-kirin-memleak-v1-1-62b45b879576@gmail.com
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
[bhelgaas: move to GPIO series to avoid bisection hole, commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>1 parent 2e81122 commit 7e8e4fc
1 file changed
Lines changed: 6 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
404 | 403 | | |
405 | 404 | | |
406 | | - | |
407 | | - | |
| 405 | + | |
| 406 | + | |
408 | 407 | | |
409 | 408 | | |
410 | 409 | | |
| |||
415 | 414 | | |
416 | 415 | | |
417 | 416 | | |
418 | | - | |
419 | | - | |
| 417 | + | |
420 | 418 | | |
421 | 419 | | |
422 | 420 | | |
423 | 421 | | |
424 | 422 | | |
425 | | - | |
| 423 | + | |
426 | 424 | | |
427 | 425 | | |
428 | 426 | | |
429 | 427 | | |
430 | 428 | | |
431 | 429 | | |
432 | 430 | | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
| 431 | + | |
| 432 | + | |
437 | 433 | | |
438 | 434 | | |
439 | 435 | | |
440 | 436 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | 437 | | |
447 | 438 | | |
448 | 439 | | |
| |||
0 commit comments