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

Commit bb7dfd9e authored by Santosh Mardi's avatar Santosh Mardi
Browse files

devfreq: check for valid hwmon node during get frequency



Update the condition to check valid hwmon before accessing it because
during parallel usecase of resume call and scaling_max_freq store call
it triggers a call to governor to get frequency and governor tries to
access hwmon node from devfreq pointer and it will be NULL if the
governor has failed to start.

Change-Id: I6ee7b784c3cf5e62d5f3f5b48e75ed44483d1a50
Signed-off-by: default avatarSantosh Mardi <gsantosh@codeaurora.org>
parent 01dafb76
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -705,7 +705,7 @@ static int devfreq_bw_hwmon_get_freq(struct devfreq *df,
	struct hwmon_node *node = df->data;

	/* Suspend/resume sequence */
	if (!node->mon_started) {
	if (node && !node->mon_started) {
		*freq = node->resume_freq;
		*node->dev_ab = node->resume_ab;
		return 0;