Commit 4ee9486
Asoc: tacna: Increment refcount of a node when sharing of_node
When copying the pointer of the of_node rather than grabbing a
reference counted handle to it, the receiver module can remove
the node if refcount gets zero (during his unload steps),
even if the owner of the node it's still loaded. Because
the owner didn't incresead the refcount before sharing.
For example, the mfd children will execute, as part
of their unloading process:
platform_device_release() -> of_device_node_put() -> of_node_put()
Which will be asymmetric with of_node_get()s, because just copying
the pointer don't increse the refcount, but using of_node_get will
increase.
Change-Id: Icf2c4e608ab3037f4e91234135cda5b793fb25aa
Signed-off-by: Lucas Tanure <[email protected]>1 parent 3575e59 commit 4ee9486
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2810 | 2810 | | |
2811 | 2811 | | |
2812 | 2812 | | |
2813 | | - | |
| 2813 | + | |
2814 | 2814 | | |
2815 | 2815 | | |
2816 | 2816 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1380 | 1380 | | |
1381 | 1381 | | |
1382 | 1382 | | |
1383 | | - | |
| 1383 | + | |
1384 | 1384 | | |
1385 | 1385 | | |
1386 | 1386 | | |
| |||
0 commit comments