From: Adrian Bunk <bunk@stusta.de>
To: Jacob Shin <jacob.shin@amd.com>
Cc: Dave Jones <davej@redhat.com>, Thomas Renninger <trenn@suse.de>,
Andi Kleen <ak@suse.de>,
linux-kernel@vger.kernel.org
Subject: [2.6 patch] arch/i386/kernel/cpu/cpufreq/powernow-k8.c: fix a check-after-use
Date: Wed, 19 Apr 2006 00:07:28 +0200 [thread overview]
Message-ID: <20060418220728.GU11582@stusta.de> (raw)
This patch fixes a check-after-use introduced by commit
4211a30349e8d2b724cfb4ce2584604f5e59c299 and spotted by the Coverity
checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- linux-2.6.17-rc1-mm3-full/arch/i386/kernel/cpu/cpufreq/powernow-k8.c.old 2006-04-18 20:32:27.000000000 +0200
+++ linux-2.6.17-rc1-mm3-full/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2006-04-18 20:33:02.000000000 +0200
@@ -905,14 +905,17 @@ static int powernowk8_target(struct cpuf
{
cpumask_t oldmask = CPU_MASK_ALL;
struct powernow_k8_data *data = powernow_data[pol->cpu];
- u32 checkfid = data->currfid;
- u32 checkvid = data->currvid;
+ u32 checkfid;
+ u32 checkvid;
unsigned int newstate;
int ret = -EIO;
if (!data)
return -EINVAL;
+ checkfid = data->currfid;
+ checkvid = data->currvid;
+
/* only run on specific CPU from here on */
oldmask = current->cpus_allowed;
set_cpus_allowed(current, cpumask_of_cpu(pol->cpu));
next reply other threads:[~2006-04-18 22:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-18 22:07 Adrian Bunk [this message]
2006-04-18 22:14 ` [2.6 patch] arch/i386/kernel/cpu/cpufreq/powernow-k8.c: fix a check-after-use Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060418220728.GU11582@stusta.de \
--to=bunk@stusta.de \
--cc=ak@suse.de \
--cc=davej@redhat.com \
--cc=jacob.shin@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trenn@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox