Lines Matching refs:err
52 int err = 0; in msr_read() local
59 err = rdmsr_safe_on_cpu(cpu, reg, &data[0], &data[1]); in msr_read()
60 if (err) in msr_read()
63 err = -EFAULT; in msr_read()
70 return bytes ? bytes : err; in msr_read()
80 int err = 0; in msr_write() local
83 err = security_locked_down(LOCKDOWN_MSR); in msr_write()
84 if (err) in msr_write()
85 return err; in msr_write()
92 err = -EFAULT; in msr_write()
95 err = wrmsr_safe_on_cpu(cpu, reg, data[0], data[1]); in msr_write()
96 if (err) in msr_write()
102 return bytes ? bytes : err; in msr_write()
110 int err; in msr_ioctl() local
115 err = -EBADF; in msr_ioctl()
119 err = -EFAULT; in msr_ioctl()
122 err = rdmsr_safe_regs_on_cpu(cpu, regs); in msr_ioctl()
123 if (err) in msr_ioctl()
126 err = -EFAULT; in msr_ioctl()
131 err = -EBADF; in msr_ioctl()
135 err = -EFAULT; in msr_ioctl()
138 err = security_locked_down(LOCKDOWN_MSR); in msr_ioctl()
139 if (err) in msr_ioctl()
141 err = wrmsr_safe_regs_on_cpu(cpu, regs); in msr_ioctl()
142 if (err) in msr_ioctl()
145 err = -EFAULT; in msr_ioctl()
149 err = -ENOTTY; in msr_ioctl()
153 return err; in msr_ioctl()
209 int err; in msr_init() local
217 err = PTR_ERR(msr_class); in msr_init()
222 err = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "x86/msr:online", in msr_init()
224 if (err < 0) in msr_init()
226 cpuhp_msr_state = err; in msr_init()
233 return err; in msr_init()