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

Commit 916cdfdf authored by Taniya Das's avatar Taniya Das
Browse files

clk: qcom: clock-a7: Fix null pointer dereference for apc_dev



apc_dev would be used uninitialized and could lead to null pointer
dereference, fix the same.

Change-Id: I0c38c72c5721c7da5ab2b5cdfe0925f3c6e57c8b
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent d2f33c1b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -148,6 +148,12 @@ static void populate_opp_table(struct platform_device *pdev)

	apc_node = of_parse_phandle(pdev->dev.of_node, "cpu-vdd-supply", 0);
	if (!apc_node) {
		pr_err("can't find the apc0 dt node.\n");
		return;
	}

	apc_dev = of_find_device_by_node(apc_node);
	if (!apc_dev) {
		pr_err("can't find the apc0 device node.\n");
		return;
	}