git: 6b42548c6dd7 - stable/13 - subr_bus: Stop checking for failures from malloc(M_WAITOK)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 30 Sep 2024 05:07:59 UTC
The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6b42548c6dd757b8f13cb716310555773f5c9c5b commit 6b42548c6dd757b8f13cb716310555773f5c9c5b Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-09-03 10:25:17 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-09-30 05:05:28 +0000 subr_bus: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 99e3bb555cb1ef5572de54be0ffed2aa6fc080cd) (cherry picked from commit 44a6f9c9a0b503f70fb7f1d44bd75a8f68c4833f) --- sys/kern/subr_bus.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index d34bcc3cca58..06c64ef28fba 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -5618,8 +5618,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;