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

Commit 71da4511 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: qcom: clk-debug: add null pointer checks for parent clocks"

parents 21124bae 943efdef
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -295,6 +295,10 @@ static int clk_debug_read_period(void *data, u64 *val)
	ret = clk_find_and_set_parent(measure, hw);
	if (!ret) {
		parent = clk_hw_get_parent(measure);
		if (!parent) {
			mutex_unlock(&clk_debug_lock);
			return -EINVAL;
		}
		mux = to_clk_measure(parent);
		regmap_read(mux->regmap, mux->period_offset, &regval);
		if (!regval) {
@@ -339,6 +343,8 @@ void clk_debug_measure_add(struct clk_hw *hw, struct dentry *dentry)
	}

	parent = clk_hw_get_parent(measure);
	if (!parent)
		return;
	meas_parent = to_clk_measure(parent);

	if (parent->init->flags & CLK_IS_MEASURE && !meas_parent->mux_sels) {