mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 07:13:34 +00:00
remoteproc: qcom: Fix potential device node leaks
[ Upstream commit278d744c46
] Add missing of_node_put()s at two places for device nodes returned by of_parse_phandle(). Fixes:051fb70fd4
("remoteproc: qcom: Driver for the self-authenticating Hexagon v5") Signed-off-by: Tobias Jordan <Tobias.Jordan@elektrobit.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
af22d1b770
commit
bb7894391a
1 changed files with 2 additions and 0 deletions
|
@ -915,6 +915,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);
|
||||
|
@ -932,6 +933,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);
|
||||
|
|
Loading…
Reference in a new issue