From d67ae514bb946c3b6d0d71d3cef49ab738771787 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Thu, 8 Oct 2009 17:20:15 +0200 Subject: [PATCH] --- yaml --- r: 169982 b: refs/heads/master c: 5a943617ef52e9f79cd7cf437aad8870be27aabb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/cpuid.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 42fa0a321067..1d10dd177525 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 170a0bc3808909d8ea0f3f9c725c6565efe7f9c4 +refs/heads/master: 5a943617ef52e9f79cd7cf437aad8870be27aabb diff --git a/trunk/arch/x86/kernel/cpuid.c b/trunk/arch/x86/kernel/cpuid.c index ef6928418c8f..48e8e6558b26 100644 --- a/trunk/arch/x86/kernel/cpuid.c +++ b/trunk/arch/x86/kernel/cpuid.c @@ -116,18 +116,16 @@ static int cpuid_open(struct inode *inode, struct file *file) { unsigned int cpu; struct cpuinfo_x86 *c; - int ret = 0; cpu = iminor(file->f_path.dentry->d_inode); - if (cpu >= nr_cpu_ids || !cpu_online(cpu)) { - ret = -ENXIO; /* No such CPU */ - goto out; - } + if (cpu >= nr_cpu_ids || !cpu_online(cpu)) + return -ENXIO; /* No such CPU */ + c = &cpu_data(cpu); if (c->cpuid_level < 0) - ret = -EIO; /* CPUID not supported */ -out: - return ret; + return -EIO; /* CPUID not supported */ + + return 0; } /*