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

Commit 6d44a116 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpuidle: lpm-levels: Fix NULL pointer exception at lpm_get_latency"

parents 4d909146 34a52920
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -239,6 +239,11 @@ int lpm_get_latency(struct latency_level *level, uint32_t *latency)
	struct lpm_cluster *cluster;
	uint32_t val;

	if (!lpm_root_node) {
		pr_err("%s: lpm_probe not completed\n", __func__);
		return -EAGAIN;
	}

	if ((level->affinity_level < 0)
		|| (level->affinity_level > lpm_root_node->aff_level)
		|| (level->reset_level < LPM_RESET_LVL_RET)
@@ -246,11 +251,6 @@ int lpm_get_latency(struct latency_level *level, uint32_t *latency)
		|| !latency)
		return -EINVAL;

	if (!lpm_root_node) {
		pr_err("%s: lpm_probe not completed\n", __func__);
		return -EAGAIN;
	}

	cluster = cluster_aff_match(lpm_root_node, level->affinity_level);
	if (!cluster) {
		pr_err("%s:No matching cluster found for affinity_level:%d\n",