diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c index 83b14adc8524..a6b4d1e8ef3a 100644 --- a/sys/dev/usb/if_upgt.c +++ b/sys/dev/usb/if_upgt.c @@ -2374,13 +2374,14 @@ upgt_free_cmd(struct upgt_softc *sc) { struct upgt_data *data_cmd = &sc->cmd_data; - if (data_cmd->xfer != NULL) { - usbd_destroy_xfer(data_cmd->xfer); - data_cmd->xfer = NULL; - } + if (data_cmd->xfer == NULL) + return; mutex_destroy(&sc->sc_mtx); cv_destroy(&sc->sc_cv); + + usbd_destroy_xfer(data_cmd->xfer); + data_cmd->xfer = NULL; } static int diff --git a/sys/rump/librump/rumpkern/sleepq.c b/sys/rump/librump/rumpkern/sleepq.c index decc6e10c20e..2a48921c3835 100644 --- a/sys/rump/librump/rumpkern/sleepq.c +++ b/sys/rump/librump/rumpkern/sleepq.c @@ -69,7 +69,7 @@ sleepq_enqueue(sleepq_t *sq, wchan_t wc, const char *wmsg, syncobj_t *sob, } int -sleepq_block(int timo, bool catch) +sleepq_block(int timo, bool catch, struct syncobj *sobj) { struct lwp *l = curlwp; int error = 0;