diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index f217f030d2ea..0772eb8bc59a 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -1013,7 +1013,7 @@ static int ugen_detach(device_t self) { DPRINTF(("%s: disconnected\n", USBDEVNAME(self))); - device_set_desc(self, NULL); + return 0; } diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index f091594310a3..06d8485ac7e6 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -240,7 +240,7 @@ static int uhid_detach(device_t self) { DPRINTF(("%s: disconnected\n", USBDEVNAME(self))); - device_set_desc(self, NULL); + return 0; } #endif diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index 67b0f26fb67e..e622a88ff0a6 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -206,8 +206,6 @@ ukbd_detach(device_t self) DPRINTF(("%s: disconnected\n", USBDEVNAME(self))); - device_set_desc(self, NULL); - return (0); } diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 8a0005adf822..6f178dd0b503 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -449,7 +449,7 @@ static int ulpt_detach(device_t self) { DPRINTF(("%s: disconnected\n", USBDEVNAME(self))); - device_set_desc(self, NULL); + return 0; } diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index c624b8667d98..8041214f41fc 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -126,7 +126,6 @@ static int umodem_detach(device_t self) { DPRINTF(("%s: disconnected\n", USBDEVNAME(self))); - device_set_desc(self, NULL); return 0; } diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index cb1bb8a1da6b..4e8e441edb8f 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -388,7 +388,7 @@ ums_detach(device_t self) sc->sc_disconnected = 1; DPRINTF(("%s: disconnected\n", USBDEVNAME(self))); - device_set_desc(self, NULL); + free(sc->sc_loc_btn, M_USB); free(sc->sc_ibuf, M_USB);