Commit edcf2fb
nvmem: core: fix device node refcounting
In of_nvmem_cell_get(), of_get_next_parent() is used on cell_np. This
will decrement the refcount on cell_np, but cell_np is still used later
in the code. Use of_get_parent() instead and of_node_put() in the
appropriate places.
Fixes: 69aba79 ("nvmem: Add a simple NVMEM framework for consumers")
Fixes: 7ae6478 ("nvmem: core: rework nvmem cell instance creation")
Cc: [email protected]
Signed-off-by: Michael Walle <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent ab3428c commit edcf2fb
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1237 | 1237 | | |
1238 | 1238 | | |
1239 | 1239 | | |
1240 | | - | |
1241 | | - | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
1242 | 1243 | | |
| 1244 | + | |
1243 | 1245 | | |
1244 | 1246 | | |
1245 | 1247 | | |
1246 | | - | |
| 1248 | + | |
| 1249 | + | |
1247 | 1250 | | |
| 1251 | + | |
1248 | 1252 | | |
1249 | 1253 | | |
| 1254 | + | |
1250 | 1255 | | |
1251 | 1256 | | |
1252 | 1257 | | |
| |||
0 commit comments