cpufreq: remove redundant assignment to ret
authorColin Ian King <colin.king@canonical.com>
Tue, 13 Aug 2019 12:21:21 +0000 (13:21 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 20 Aug 2019 22:28:30 +0000 (00:28 +0200)
Variable ret is initialized to a value that is never read and it is
re-assigned later. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c

index c28ebf2810f11508a1c36cb1660bdd949ef3aeff..26d82e0a2de58789f97bbd2771d6fc39a75f9f21 100644 (file)
@@ -2140,7 +2140,7 @@ int cpufreq_driver_target(struct cpufreq_policy *policy,
                          unsigned int target_freq,
                          unsigned int relation)
 {
-       int ret = -EINVAL;
+       int ret;
 
        down_write(&policy->rwsem);