mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 22:02:58 -04:00
pmc_annotate: adhere to the API
If the 'mode' parameter was invalid, pmc_annotate() would return EINVAL instead of setting errno and returning -1. Sponsored by: Dell EMC
This commit is contained in:
parent
3554f22e67
commit
4f9b4ac4c2
1 changed files with 2 additions and 1 deletions
|
|
@ -2781,7 +2781,8 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode,
|
|||
|
||||
if (mode != PMC_MODE_SS && mode != PMC_MODE_TS &&
|
||||
mode != PMC_MODE_SC && mode != PMC_MODE_TC) {
|
||||
return (EINVAL);
|
||||
errno = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
bzero(&pmc_config, sizeof(pmc_config));
|
||||
pmc_config.pm_cpu = cpu;
|
||||
|
|
|
|||
Loading…
Reference in a new issue