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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334351
@ -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 New Issue
Block a user