aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2019-08-10 13:44:40 -0400
committerBrian Cully <bjc@kublai.com>2019-08-10 13:44:40 -0400
commitaab5cd2b36986c51e4a91291e0a083795b0c735f (patch)
tree66c221a5537e90c5ed8cc7a9762af079c0de0b7f /src
parent385efdf53fa3fe38591f22d01edf75d3087c2326 (diff)
downloadatsamd-usb-host-aab5cd2b36986c51e4a91291e0a083795b0c735f.tar.gz
atsamd-usb-host-aab5cd2b36986c51e4a91291e0a083795b0c735f.zip
Remove device from driver on error.
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ce551d4..2c1cf5f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -396,6 +396,7 @@ where
if let Err(e) = d.tick((self.millis)(), self) {
warn!("running driver {:?}: {:?}", d, e);
if let DriverError::Permanent(a, _) = e {
+ d.remove_device(a);
self.devices.remove(a);
}
}