Commit 9b07cdf
pinctrl: cirrus: Fix fwnode leak in cs42l43_pin_probe()
The driver calls fwnode_get_named_child_node() which takes a reference
on the child node, but never releases it, which causes a reference leak.
Fix by using devm_add_action_or_reset() to automatically release the
reference when the device is removed.
Fixes: d5282a5 ("pinctrl: cs42l43: Add support for the cs42l43")
Suggested-by: Charles Keepax <[email protected]>
Signed-off-by: Haotian Zhang <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>1 parent 316e361 commit 9b07cdf
1 file changed
+19
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
535 | 540 | | |
536 | 541 | | |
537 | 542 | | |
| |||
563 | 568 | | |
564 | 569 | | |
565 | 570 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
570 | 585 | | |
571 | 586 | | |
572 | 587 | | |
| |||
0 commit comments