From 6bce8a35cf0aa184571e7e7049c1d15873afff30 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Thu, 17 Mar 2022 15:23:46 +0100 Subject: [PATCH] usb(4): Check return value from bus_generic_get_device_path(). MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/usb/usb_hub.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/usb/usb_hub.c b/sys/dev/usb/usb_hub.c index 6cd4cfd37ee4..1e5427a8bddd 100644 --- a/sys/dev/usb/usb_hub.c +++ b/sys/dev/usb/usb_hub.c @@ -1683,6 +1683,8 @@ uhub_get_device_path(device_t bus, device_t child, const char *locator, if (strcmp(locator, BUS_LOCATOR_UEFI) == 0) { rv = bus_generic_get_device_path(device_get_parent(bus), bus, locator, sb); + if (rv != 0) + return (rv); sc = device_get_softc(bus); hub = sc->sc_udev->hub;