From ace5c22c167aaebc31687eb02c72a9ca7b3d28fe Mon Sep 17 00:00:00 2001 From: Saravana Kannan Date: Wed, 29 Apr 2020 15:35:56 -0700 Subject: [PATCH] ANDROID: GKI: PM / devfreq: Allow min freq to be 0 Some vendors have devfreq devices that allow min freq to be 0. So, allow that. Bug: 152343889 Signed-off-by: Saravana Kannan Change-Id: I03adc475338c5b0376992ab40543f481b75de895 Signed-off-by: Will McVicker --- drivers/devfreq/devfreq.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 95f5712db6db..16018e377e1e 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -543,8 +543,6 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type, mutex_lock(&devfreq->lock); devfreq->scaling_min_freq = find_available_min_freq(devfreq); - if (!devfreq->scaling_min_freq) - goto out; devfreq->scaling_max_freq = find_available_max_freq(devfreq); if (!devfreq->scaling_max_freq) { @@ -648,11 +646,6 @@ struct devfreq *devfreq_add_device(struct device *dev, } devfreq->scaling_min_freq = find_available_min_freq(devfreq); - if (!devfreq->scaling_min_freq) { - mutex_unlock(&devfreq->lock); - err = -EINVAL; - goto err_dev; - } devfreq->min_freq = devfreq->scaling_min_freq; devfreq->scaling_max_freq = find_available_max_freq(devfreq);