[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220203192201.GA18509@matrix-ESPRIMO-P710>
Date: Thu, 3 Feb 2022 20:22:01 +0100
From: Philipp Hortmann <philipp.g.hortmann@...il.com>
To: Forest Bond <forest@...ttletooquiet.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...il.com>
---
drivers/staging/vt6656/usbpipe.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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);
}
--
2.25.1
Powered by blists - more mailing lists