diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2025-12-26 15:36:48 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2025-12-26 15:36:48 +0000 |
| commit | 425b41f81634fd5a8f7d038191560040d1d4d32c (patch) | |
| tree | 2beb80273aa32be983b15ba46da9928f96900529 | |
| parent | 4eb560faa725771e536a850a9467fbb592ab3c1b (diff) | |
acpi: Use M_WAITOK in acpi_register_ioctl
This function is only called from device attach routines which can
sleep.
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54312
| -rw-r--r-- | sys/dev/acpica/acpi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index e49d3b4d1637..0aae1db9e96e 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -4205,8 +4205,7 @@ acpi_register_ioctl(u_long cmd, acpi_ioctl_fn fn, void *arg) { struct acpi_ioctl_hook *hp, *thp; - if ((hp = malloc(sizeof(*hp), M_ACPIDEV, M_NOWAIT)) == NULL) - return (ENOMEM); + hp = malloc(sizeof(*hp), M_ACPIDEV, M_WAITOK); hp->cmd = cmd; hp->fn = fn; hp->arg = arg; |
