* [PATCH] USB: serial: ti_usb_3410_5052: drop bogus read urb check
@ 2025-04-24 7:44 Johan Hovold
0 siblings, 0 replies; only message in thread
From: Johan Hovold @ 2025-04-24 7:44 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-usb, linux-kernel
The read urb pointer is dereferenced before checking that it is non-NULL
during open(), but no check is needed as the existence of a bulk in
endpoint is verified during attach() since commit ef079936d3cd ("USB:
serial: ti_usb_3410_5052: fix NULL-deref at open").
Drop the bogus read urb sanity check.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/ti_usb_3410_5052.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index a0c244bc77c0..d671189ecee2 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -729,11 +729,6 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port)
/* start read urb */
urb = port->read_urb;
- if (!urb) {
- dev_err(&port->dev, "%s - no read urb\n", __func__);
- status = -EINVAL;
- goto unlink_int_urb;
- }
tport->tp_read_urb_state = TI_READ_URB_RUNNING;
urb->context = tport;
status = usb_submit_urb(urb, GFP_KERNEL);
--
2.49.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-24 7:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24 7:44 [PATCH] USB: serial: ti_usb_3410_5052: drop bogus read urb check Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).