summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/usbpipe.c
diff options
context:
space:
mode:
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>2022-02-03 20:22:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-04 15:24:26 +0100
commit3a797f364fe98a004515deaa6880c9cf75422b59 (patch)
treea6ccdaf00749c675563d66a18f6b49f747d123fd /drivers/staging/vt6656/usbpipe.c
parentc531c785bc49a7e0253041ad9c8a32e3d83e482d (diff)
downloadlinux-3a797f364fe98a004515deaa6880c9cf75422b59.tar.bz2
staging: vt6656: Fix crash when WLAN is turned off
Stop submitting urbs before calling usb_kill_urb() and usb_free_urb(). Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20220203192201.GA18509@matrix-ESPRIMO-P710 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/usbpipe.c')
-rw-r--r--drivers/staging/vt6656/usbpipe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index 7f45734390f6..d505b4b69ba4 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -230,7 +230,9 @@ static void vnt_start_interrupt_urb_complete(struct urb *urb)
else
vnt_int_process_data(priv);
- status = usb_submit_urb(priv->interrupt_urb, GFP_ATOMIC);
+ if (!test_bit(DEVICE_FLAGS_DISCONNECTED, &priv->flags))
+ status = usb_submit_urb(priv->interrupt_urb, GFP_ATOMIC);
+
if (status)
dev_dbg(&priv->usb->dev, "Submit int URB failed %d\n", status);
}