| From foo@baz Sun Jun 17 12:07:33 CEST 2018 |
| From: Tobias Jordan <Tobias.Jordan@elektrobit.com> |
| Date: Thu, 15 Feb 2018 16:12:55 +0100 |
| Subject: remoteproc: qcom: Fix potential device node leaks |
| |
| From: Tobias Jordan <Tobias.Jordan@elektrobit.com> |
| |
| [ Upstream commit 278d744c46fd4f1925aec77752d18a0e4a9cbec3 ] |
| |
| 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> |
| Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| --- |
| drivers/remoteproc/qcom_q6v5_pil.c | 2 ++ |
| 1 file changed, 2 insertions(+) |
| |
| --- a/drivers/remoteproc/qcom_q6v5_pil.c |
| +++ b/drivers/remoteproc/qcom_q6v5_pil.c |
| @@ -1088,6 +1088,7 @@ static int q6v5_alloc_memory_region(stru |
| 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); |
| @@ -1105,6 +1106,7 @@ static int q6v5_alloc_memory_region(stru |
| 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); |