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

Commit 72fdec1d authored by Archana Sathyakumar's avatar Archana Sathyakumar Committed by Matt Wagantall
Browse files

msm-core: Check for NULL child_node



Currently child_node is being deferenced without the check for NULL value.
of_get_cpu_node could return NULL as well. Add a check for NULL value
and proceed with deference only if it has a valid value.

Change-Id: I478c4bb66d08c783978339263f80861145a1684a
Signed-off-by: default avatarArchana Sathyakumar <asathyak@codeaurora.org>
parent dfd86ae5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -875,6 +875,9 @@ static int msm_core_params_init(struct platform_device *pdev)
	for_each_possible_cpu(cpu) {
		child_node = of_get_cpu_node(cpu, NULL);

		if (!child_node)
			continue;

		mpidr = msm_core_mpidr_init(child_node);
		if (mpidr < 0)
			return mpidr;