mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 22:02:58 -04:00
libpmc: don't return -1 on success in pmc_allocate
This commit is contained in:
parent
cbf7e0cba7
commit
1a32aa0ff7
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue