aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorTobias Jordan <Tobias.Jordan@elektrobit.com>2018-02-15 16:12:55 +0100
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-04-25 16:46:55 -0700
commit278d744c46fd4f1925aec77752d18a0e4a9cbec3 (patch)
treefe88cca13347086c27a02aef69c61fb68720792f /drivers/remoteproc
parentremoteproc: fix crashed parameter logic on stop call (diff)
downloadlinux-dev-278d744c46fd4f1925aec77752d18a0e4a9cbec3.tar.xz
linux-dev-278d744c46fd4f1925aec77752d18a0e4a9cbec3.zip
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: 051fb70fd4ea ("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>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/qcom_q6v5_pil.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c
index 8e70a627e0bb..cbbafdcaaecb 100644
--- a/drivers/remoteproc/qcom_q6v5_pil.c
+++ b/drivers/remoteproc/qcom_q6v5_pil.c
@@ -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);