subr_bus: Stop checking for failures from malloc(M_WAITOK)

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
This commit is contained in:
Zhenlei Huang 2024-09-03 18:25:17 +08:00
parent f444db950e
commit 99e3bb555c

View file

@ -5422,8 +5422,6 @@ sysctl_devices(SYSCTL_HANDLER_ARGS)
* Populate the return item, careful not to overflow the buffer.
*/
udev = malloc(sizeof(*udev), M_BUS, M_WAITOK | M_ZERO);
if (udev == NULL)
return (ENOMEM);
udev->dv_handle = (uintptr_t)dev;
udev->dv_parent = (uintptr_t)dev->parent;
udev->dv_devflags = dev->devflags;