diff --git a/embassy-stm32/src/usb/otg.rs b/embassy-stm32/src/usb/otg.rs index fa1a80b17..9551af99b 100644 --- a/embassy-stm32/src/usb/otg.rs +++ b/embassy-stm32/src/usb/otg.rs @@ -280,7 +280,6 @@ impl<'d, T: Instance> embassy_usb_driver::Bus for Bus<'d, T> { } async fn disable(&mut self) { - Bus::disable(self); // NOTE: inner call is a no-op self.inner.disable().await } @@ -291,7 +290,9 @@ impl<'d, T: Instance> embassy_usb_driver::Bus for Bus<'d, T> { } impl<'d, T: Instance> Drop for Bus<'d, T> { - fn drop(&mut self) {} + fn drop(&mut self) { + Bus::disable(self); + } } trait SealedInstance {