usb(4): Check return value from bus_generic_get_device_path().

MFC after:		1 week
Sponsored by:		NVIDIA Networking
This commit is contained in:
Hans Petter Selasky 2022-03-17 15:23:46 +01:00
parent 5e203517e0
commit 6bce8a35cf

View File

@ -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;