From 27b0085768b55f2ed8faf4f1254023a03dc3eb24 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Mon, 30 Sep 2019 15:19:13 +0200 Subject: [PATCH] USB: chaoskey: fix error case of a timeout In case of a timeout communication with the device needs to be ended from the host side, lest we overwrite an active URB Signed-off-by: Oliver Neukum --- drivers/usb/misc/chaoskey.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc/chaoskey.c index cf5828ce927a..850f46cbace2 100644 --- a/drivers/usb/misc/chaoskey.c +++ b/drivers/usb/misc/chaoskey.c @@ -391,6 +391,8 @@ static int _chaoskey_fill(struct chaoskey *dev) else result = dev->valid; out: + /* in case of a timeout */ + usb_kill_urb(dev->urb); /* Let the device go back to sleep eventually */ usb_autopm_put_interface(dev->interface); -- 2.16.4