PM / devfreq: tegra: remove unneeded variable
authorYangtao Li <tiny.windzz@gmail.com>
Sat, 16 Feb 2019 15:18:26 +0000 (10:18 -0500)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 16 Apr 2019 00:29:18 +0000 (09:29 +0900)
This variable is not used after initialization, so
remove it. And in order to unify the code style,
move the location where the dev_get_drvdata is called
by the way.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/tegra-devfreq.c

index c59d2eee5d3091ce0315092975a2692e1589ce34..c89ba7b834ffe164197abb179f29eb600f325399 100644 (file)
@@ -573,10 +573,7 @@ static int tegra_governor_get_target(struct devfreq *devfreq,
 static int tegra_governor_event_handler(struct devfreq *devfreq,
                                        unsigned int event, void *data)
 {
-       struct tegra_devfreq *tegra;
-       int ret = 0;
-
-       tegra = dev_get_drvdata(devfreq->dev.parent);
+       struct tegra_devfreq *tegra = dev_get_drvdata(devfreq->dev.parent);
 
        switch (event) {
        case DEVFREQ_GOV_START:
@@ -600,7 +597,7 @@ static int tegra_governor_event_handler(struct devfreq *devfreq,
                break;
        }
 
-       return ret;
+       return 0;
 }
 
 static struct devfreq_governor tegra_devfreq_governor = {