The C Source, Patches and (shudder!) Bugs
Post Reply
lkundrak
Posts: 24
Joined: 22 Jun 2016, 14:17

usb_modeswitch: count the target devices from zero

Post by lkundrak » 18 Aug 2017, 10:47

Most likely a typo here.
Attachments
0002-usb_modeswitch-count-the-target-devices-from-zero.patch
(878 Bytes) Downloaded 746 times

lkundrak
Posts: 24
Joined: 22 Jun 2016, 14:17

Re: usb_modeswitch: count the target devices from zero

Post by lkundrak » 28 Feb 2018, 23:22

Update for 2.5.2
Attachments
0001-usb_modeswitch-count-the-target-devices-from-zero.patch
[PATCH] usb_modeswitch: count the target devices from zero
(847 Bytes) Downloaded 712 times

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: usb_modeswitch: count the target devices from zero

Post by Josh » 02 Mar 2018, 08:54

What's counted here are seconds. The idea is to have two loops with waits, and to limit their combined waiting according to the CheckSuccess parameter.

lkundrak
Posts: 24
Joined: 22 Jun 2016, 14:17

Re: usb_modeswitch: count the target devices from zero

Post by lkundrak » 24 Mar 2020, 16:47

Uh, okay, my bad. Then i is possibly uninitialized though (when devh is unset).
Attachments
0001-usb_modeswitch-fix-a-possible-uninitialized-loop-cou.patch
(1.61 KiB) Downloaded 521 times

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: usb_modeswitch: count the target devices from zero

Post by Josh » 18 May 2020, 20:26

You are of course right about the possible initialization failure so I will add the fix - and the comment, to avoid future confusion ...

Post Reply