diff options
-rw-r--r-- | arch/i386/kernel/cpuid.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c index 13bae799e626..006141d1c12a 100644 --- a/arch/i386/kernel/cpuid.c +++ b/arch/i386/kernel/cpuid.c | |||
@@ -117,14 +117,13 @@ static ssize_t cpuid_read(struct file *file, char __user *buf, | |||
117 | { | 117 | { |
118 | char __user *tmp = buf; | 118 | char __user *tmp = buf; |
119 | u32 data[4]; | 119 | u32 data[4]; |
120 | size_t rv; | ||
121 | u32 reg = *ppos; | 120 | u32 reg = *ppos; |
122 | int cpu = iminor(file->f_dentry->d_inode); | 121 | int cpu = iminor(file->f_dentry->d_inode); |
123 | 122 | ||
124 | if (count % 16) | 123 | if (count % 16) |
125 | return -EINVAL; /* Invalid chunk size */ | 124 | return -EINVAL; /* Invalid chunk size */ |
126 | 125 | ||
127 | for (rv = 0; count; count -= 16) { | 126 | for (; count; count -= 16) { |
128 | do_cpuid(cpu, reg, data); | 127 | do_cpuid(cpu, reg, data); |
129 | if (copy_to_user(tmp, &data, 16)) | 128 | if (copy_to_user(tmp, &data, 16)) |
130 | return -EFAULT; | 129 | return -EFAULT; |