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

Commit c985af17 authored by Yue Ma's avatar Yue Ma
Browse files

wcnss: Check the return value of clk_set_parent() when sample clock



The return value of clk_set_parent() should be checked when sample WCNSS
TOP AHB clock on WCNSS WDOG bite, otherwise it might be pointing to an
old parent that happens to be enabled.

Change-Id: I8b6ef12fa9f1b9bf6869fcfb7441148ee9d7c84c
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 3c29955b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -729,7 +729,9 @@ void wcnss_log_debug_regs_on_bite(void)
	wcnss_debug_mux = clk_get(&pdev->dev, "wcnss_debug");

	if (!IS_ERR(measure) && !IS_ERR(wcnss_debug_mux)) {
		clk_set_parent(measure, wcnss_debug_mux);
		if (clk_set_parent(measure, wcnss_debug_mux))
			return;

		clk_rate = clk_get_rate(measure);
		pr_debug("wcnss: clock frequency is: %luHz\n", clk_rate);