Commit 278d744c authored by Tobias Jordan's avatar Tobias Jordan Committed by Bjorn Andersson

remoteproc: qcom: Fix potential device node leaks

Add missing of_node_put()s at two places for device nodes returned by
of_parse_phandle().

Fixes: 051fb70f ("remoteproc: qcom: Driver for the self-authenticating
 Hexagon v5")
Signed-off-by: default avatarTobias Jordan <Tobias.Jordan@elektrobit.com>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent fcd58037
......@@ -1083,6 +1083,7 @@ static int q6v5_alloc_memory_region(struct q6v5 *qproc)
dev_err(qproc->dev, "unable to resolve mba region\n");
return ret;
}
of_node_put(node);
qproc->mba_phys = r.start;
qproc->mba_size = resource_size(&r);
......@@ -1100,6 +1101,7 @@ static int q6v5_alloc_memory_region(struct q6v5 *qproc)
dev_err(qproc->dev, "unable to resolve mpss region\n");
return ret;
}
of_node_put(node);
qproc->mpss_phys = qproc->mpss_reloc = r.start;
qproc->mpss_size = resource_size(&r);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment