Re: [PATCH net 08/10] can: esd_usb: Fix not detecting version reply in probe routine
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-09-23 00:16:28
Also in:
linux-can
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-09-23 00:16:28
Also in:
linux-can
On Mon, 22 Sep 2025 12:07:38 +0200 Marc Kleine-Budde wrote:
+ do {
+ int actual_length;
+ int pos;
+
+ err = usb_bulk_msg(dev->udev,
+ usb_rcvbulkpipe(dev->udev, 1),
+ rx_buf,
+ ESD_USB_RX_BUFFER_SIZE,
+ &actual_length,
+ ESD_USB_DRAIN_TIMEOUT_MS);
+ dev_dbg(&dev->udev->dev, "AT %d, LEN %d, ERR %d\n", attempt, actual_length, err);
+ ++attempt;
+ if (err)
+ goto bail;
+ if (actual_length == 0)
+ continue;continue in do-while loops doesn't check the condition. This looks like a potential infinite loop?