Skip to content

Commit

Permalink
Merge tag 'devicetree-fixes-for-6.1-2' of git://git.kernel.org/pub/sc…
Browse files Browse the repository at this point in the history
…m/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()
  • Loading branch information
Linus Torvalds committed Nov 28, 2022
2 parents cb525a6 + 60d865b commit 4009166
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/of/property.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4009166

Please sign in to comment.