libpmc: don't return -1 on success in pmc_allocate
This commit is contained in:
parent
cbf7e0cba7
commit
1a32aa0ff7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334349
@ -2796,9 +2796,9 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode,
|
||||
ctrname = strsep(&r, ",");
|
||||
if (pmc_pmu_pmcallocate(ctrname, &pmc_config) == 0) {
|
||||
if (PMC_CALL(PMCALLOCATE, &pmc_config) < 0) {
|
||||
retval = errno;
|
||||
goto out;
|
||||
}
|
||||
retval = 0;
|
||||
*pmcid = pmc_config.pm_pmcid;
|
||||
goto out;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user