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

Commit 31fc2a56 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "PM / devfreq: fix NULL pointer dereference for freq_table"

parents 0401077e 50c2f64e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1200,7 +1200,7 @@ static ssize_t available_frequencies_show(struct device *d,
	unsigned long freq = 0;

	use_opp = dev_pm_opp_get_opp_count(dev) > 0;
	do {
	while (use_opp || (!use_opp && i < max_state)) {
		if (use_opp) {
			opp = dev_pm_opp_find_freq_ceil(dev, &freq);
			if (IS_ERR(opp))
@@ -1213,7 +1213,7 @@ static ssize_t available_frequencies_show(struct device *d,
		count += scnprintf(&buf[count], (PAGE_SIZE - count - 2),
				   "%lu ", freq);
		freq++;
	} while (use_opp || (!use_opp && i < max_state));
	}

	/* Truncate the trailing space */
	if (count)