diff options
| -rw-r--r-- | arch/x86/kernel/microcode_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index cceb5bc3c3c2..2cd8c544e41a 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c | |||
| @@ -201,9 +201,9 @@ static int do_microcode_update(const void __user *buf, size_t size) | |||
| 201 | return error; | 201 | return error; |
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | static int microcode_open(struct inode *unused1, struct file *unused2) | 204 | static int microcode_open(struct inode *inode, struct file *file) |
| 205 | { | 205 | { |
| 206 | return capable(CAP_SYS_RAWIO) ? 0 : -EPERM; | 206 | return capable(CAP_SYS_RAWIO) ? nonseekable_open(inode, file) : -EPERM; |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | static ssize_t microcode_write(struct file *file, const char __user *buf, | 209 | static ssize_t microcode_write(struct file *file, const char __user *buf, |
