diff options
author | Mark Johnston <markj@FreeBSD.org> | 2020-07-22 14:32:47 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2020-07-22 14:32:47 +0000 |
commit | 94140f4781f83c9e98f582439ed69d000ff0323a (patch) | |
tree | eb82b0dcf8af2286a9f3eb52cf3cb34652ffa5c1 /sys/dev/usb/input/uhid_snes.c | |
parent | 3b01bf881c848ba0be72fc74ba5eaa58c66c35e1 (diff) | |
download | src-94140f4781f83c9e98f582439ed69d000ff0323a.tar.gz src-94140f4781f83c9e98f582439ed69d000ff0323a.zip |
usb(4): Stop checking for failures from malloc(M_WAITOK).
Handle the fact that parts of usb(4) can be compiled into the boot
loader, where M_WAITOK does not guarantee a successful allocation.
PR: 240545
Submitted by: Andrew Reiter <arr@watson.org> (original version)
Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25706
Notes
Notes:
svn path=/head/; revision=363420
Diffstat (limited to 'sys/dev/usb/input/uhid_snes.c')
-rw-r--r-- | sys/dev/usb/input/uhid_snes.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sys/dev/usb/input/uhid_snes.c b/sys/dev/usb/input/uhid_snes.c index 5c043acdf6a7..79089782a464 100644 --- a/sys/dev/usb/input/uhid_snes.c +++ b/sys/dev/usb/input/uhid_snes.c @@ -168,10 +168,6 @@ uhid_get_report(struct uhid_snes_softc *sc, uint8_t type, if (kern_data == NULL) { kern_data = malloc(len, M_USBDEV, M_WAITOK); - if (kern_data == NULL) { - err = ENOMEM; - goto done; - } free_data = 1; } err = usbd_req_get_report(sc->sc_udev, NULL, kern_data, @@ -203,10 +199,6 @@ uhid_set_report(struct uhid_snes_softc *sc, uint8_t type, if (kern_data == NULL) { kern_data = malloc(len, M_USBDEV, M_WAITOK); - if (kern_data == NULL) { - err = ENOMEM; - goto done; - } free_data = 1; err = copyin(user_data, kern_data, len); if (err) { |