|
@@ -116,18 +116,16 @@ static int cpuid_open(struct inode *inode, struct file *file)
|
|
{
|
|
{
|
|
unsigned int cpu;
|
|
unsigned int cpu;
|
|
struct cpuinfo_x86 *c;
|
|
struct cpuinfo_x86 *c;
|
|
- int ret = 0;
|
|
|
|
|
|
|
|
cpu = iminor(file->f_path.dentry->d_inode);
|
|
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);
|
|
c = &cpu_data(cpu);
|
|
if (c->cpuid_level < 0)
|
|
if (c->cpuid_level < 0)
|
|
- ret = -EIO; /* CPUID not supported */
|
|
|
|
-out:
|
|
|
|
- return ret;
|
|
|
|
|
|
+ return -EIO; /* CPUID not supported */
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|