diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c index a8414d04c531..1956d7bd9ee7 100644 --- a/sys/dev/acpica/acpi_perf.c +++ b/sys/dev/acpica/acpi_perf.c @@ -401,7 +401,7 @@ acpi_px_settings(device_t dev, struct cf_setting *sets, int *count, int *type) if (sets == NULL || count == NULL) return (EINVAL); if (*count < sc->px_count - sc->px_max_avail) - return (ENOMEM); + return (E2BIG); /* Return a list of settings that are currently valid. */ y = 0; diff --git a/sys/dev/acpica/acpi_throttle.c b/sys/dev/acpica/acpi_throttle.c index 22aa71f989ff..51894c2ee8c3 100644 --- a/sys/dev/acpica/acpi_throttle.c +++ b/sys/dev/acpica/acpi_throttle.c @@ -329,7 +329,7 @@ acpi_thr_settings(device_t dev, struct cf_setting *sets, int *count, int *type) if (sets == NULL || count == NULL) return (EINVAL); if (*count < CPU_MAX_SPEED) - return (ENOMEM); + return (E2BIG); /* Return a list of valid settings for this driver. */ memset(sets, CPUFREQ_VAL_UNKNOWN, sizeof(*sets) * CPU_MAX_SPEED);