diff options
Diffstat (limited to '')
-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 43720c2de..13c7e55f5 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -918,8 +918,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); |