diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-11-28 14:59:17 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-11-28 14:59:17 -0800 |
commit | 4009166c3918ccfbf4daf0790630261153d6b646 (patch) | |
tree | 4f0d6b3fc78a2d81a552d19118e3fa26b0b0877d | |
parent | cb525a6513fad6e28f063f56db0a17e264bc8811 (diff) | |
parent | 60d865bd5a9b15a3961eb1c08bd4155682a3c81e (diff) |
Merge tag 'devicetree-fixes-for-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree fix from Rob Herring:
- Fix DT node reference counting for of_fwnode_get_reference_args()
exit path
* tag 'devicetree-fixes-for-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
of: property: decrement node refcount in of_fwnode_get_reference_args()
-rw-r--r-- | drivers/of/property.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/of/property.c b/drivers/of/property.c index 967f79b59016..134cfc980b70 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -993,8 +993,10 @@ of_fwnode_get_reference_args(const struct fwnode_handle *fwnode, nargs, index, &of_args); if (ret < 0) return ret; - if (!args) + if (!args) { + of_node_put(of_args.np); return 0; + } args->nargs = of_args.args_count; args->fwnode = of_fwnode_handle(of_args.np); |