Commit a2539b9
pinctrl: meson: amlogic-a4: Fix device node reference leak in aml_dt_node_to_map_pinmux()
The of_get_parent() function returns a device_node with an incremented
reference count.
Use the __free(device_node) cleanup attribute to ensure of_node_put()
is automatically called when pnode goes out of scope, fixing a
reference leak.
Fixes: 6e9be3a ("pinctrl: Add driver support for Amlogic SoCs")
Signed-off-by: Felix Gu <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>1 parent e9e268e commit a2539b9
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | | - | |
683 | 682 | | |
684 | 683 | | |
685 | 684 | | |
| |||
693 | 692 | | |
694 | 693 | | |
695 | 694 | | |
696 | | - | |
| 695 | + | |
697 | 696 | | |
698 | 697 | | |
699 | 698 | | |
| |||
0 commit comments