Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);