Skip to content

Commit 4009166

Browse files
committed
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()
2 parents cb525a6 + 60d865b commit 4009166

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/of/property.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,8 +993,10 @@ of_fwnode_get_reference_args(const struct fwnode_handle *fwnode,
993993
nargs, index, &of_args);
994994
if (ret < 0)
995995
return ret;
996-
if (!args)
996+
if (!args) {
997+
of_node_put(of_args.np);
997998
return 0;
999+
}
9981000

9991001
args->nargs = of_args.args_count;
10001002
args->fwnode = of_fwnode_handle(of_args.np);

0 commit comments

Comments
 (0)