mirror of
https://github.com/anrieff/libcpuid
synced 2025-02-12 20:24:05 +00:00
RDMSR: fix returned value on NULL handler
It should return CPU_INVALID_VALUE on error, not ERR_HANDLE
This commit is contained in:
parent
e7bfcc3651
commit
09a75e95f2
1 changed files with 4 additions and 2 deletions
|
@ -913,8 +913,10 @@ int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which)
|
|||
static struct internal_id_info_t internal;
|
||||
static struct msr_info_t info;
|
||||
|
||||
if (handle == NULL)
|
||||
return set_error(ERR_HANDLE);
|
||||
if (handle == NULL) {
|
||||
set_error(ERR_HANDLE);
|
||||
return CPU_INVALID_VALUE;
|
||||
}
|
||||
|
||||
if (!init) {
|
||||
err = cpuid_get_raw_data(&raw);
|
||||
|
|
Loading…
Add table
Reference in a new issue