On Wed, Feb 10 2016, Yishai Hadas <[email protected]> wrote:
>> @@ -2429,7 +2429,7 @@ err_thread:
>> flush_workqueue(priv->mfunc.master.comm_wq);
>> destroy_workqueue(priv->mfunc.master.comm_wq);
>> err_slaves:
>> - while (--i) {
>> + while (i--) {
>
> This fix is wrong as it hits the case that i arrived the last value
> then below code will access to a non valid entry in the array.
>
> The expected fix should be:
> while (--i >= 0)
>
Huh? They're completely equivalent (given that i is necessarily
non-negative before we evaluate the loop condition). I don't really care
either way, but git grep says that 'while (i--)' is 5 times more common
than 'while (--i >= 0)'.
Rasmus