[PATCH] PM / devfreq: mediatek: Fix unnecessary check of drvdata
matthias.bgg at kernel.org
matthias.bgg at kernel.org
Mon Jun 20 08:43:47 PDT 2022
From: Matthias Brugger <matthias.bgg at gmail.com>
Probe function will error out if drvdata 'mtk_ccifreq_drv' is null.
So when mtk_ccifreq_target get's called, the drv pointer will never be
NULL. This fixes a static checker warning.
Cc: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
---
drivers/devfreq/mtk-cci-devfreq.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/devfreq/mtk-cci-devfreq.c b/drivers/devfreq/mtk-cci-devfreq.c
index 71abb3fbd042..ad05b152071d 100644
--- a/drivers/devfreq/mtk-cci-devfreq.c
+++ b/drivers/devfreq/mtk-cci-devfreq.c
@@ -132,9 +132,6 @@ static int mtk_ccifreq_target(struct device *dev, unsigned long *freq,
unsigned long opp_rate;
int voltage, pre_voltage, inter_voltage, target_voltage, ret;
- if (!drv)
- return -EINVAL;
-
if (drv->pre_freq == *freq)
return 0;
--
2.36.0
More information about the Linux-mediatek
mailing list