clk: qcom: clk-debug: Fix accessing mux when it is NULL

When debugcc did not register, measure/mux will be NULL.
Avoid accessing it.

Change-Id: I037151e258ae85c89c9db87254e5b8ea850157a0
Signed-off-by: Veera Vegivada <quic_vvegivad@quicinc.com>
This commit is contained in:
Veera Vegivada 2022-04-28 12:14:51 +05:30 committed by Gerrit - the friendly Code Review server
parent 67fde14ade
commit 4856d5b443

View File

@ -445,6 +445,9 @@ static int clk_debug_measure_get(void *data, u64 *val)
int ret = 0;
u32 regval;
if (!measure)
return -EINVAL;
ret = clk_runtime_get_debug_mux(meas);
if (ret)
return ret;