From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Date: Mon, 26 Aug 2019 09:20:21 +0000 Subject: Re: [PATCH] cpufreq: remove redundant assignment to ret Message-Id: <2250924.CPEEF64KPg@kreacher> List-Id: References: <20190813122121.28160-1-colin.king@canonical.com> <20190819065814.333kowws4mpw3qfx@vireshk-i7> In-Reply-To: <20190819065814.333kowws4mpw3qfx@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Viresh Kumar , Colin King Cc: linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org On Monday, August 19, 2019 8:58:14 AM CEST Viresh Kumar wrote: > On 13-08-19, 13:21, Colin King wrote: > > From: Colin Ian King > > > > 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 > > --- > > drivers/cpufreq/cpufreq.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > > index c28ebf2810f1..26d82e0a2de5 100644 > > --- a/drivers/cpufreq/cpufreq.c > > +++ b/drivers/cpufreq/cpufreq.c > > @@ -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); > > > > Acked-by: Viresh Kumar > > Patch applied, thanks!