Re: [PATCH] ASoC: stm32: sai: Fix unsigned comparison with less than zero

2018-11-29 Thread Mark Brown
On Thu, Nov 29, 2018 at 10:06:11AM +0800, Wen Yang wrote: > The return from the call to stm32_sai_get_clk_div can be a negative error > code however this is being assigned to an unsigned variable 'div' > hence the check is always false. Fix this by making 'div' an > int. This doesn't apply

Re: [PATCH] ASoC: stm32: sai: Fix unsigned comparison with less than zero

2018-11-29 Thread Mark Brown
On Thu, Nov 29, 2018 at 10:06:11AM +0800, Wen Yang wrote: > The return from the call to stm32_sai_get_clk_div can be a negative error > code however this is being assigned to an unsigned variable 'div' > hence the check is always false. Fix this by making 'div' an > int. This doesn't apply

[PATCH] ASoC: stm32: sai: Fix unsigned comparison with less than zero

2018-11-28 Thread Wen Yang
The return from the call to stm32_sai_get_clk_div can be a negative error code however this is being assigned to an unsigned variable 'div' hence the check is always false. Fix this by making 'div' an int. Detected by Coccinelle ("Unsigned expression compared with zero:stages < 0")

[PATCH] ASoC: stm32: sai: Fix unsigned comparison with less than zero

2018-11-28 Thread Wen Yang
The return from the call to stm32_sai_get_clk_div can be a negative error code however this is being assigned to an unsigned variable 'div' hence the check is always false. Fix this by making 'div' an int. Detected by Coccinelle ("Unsigned expression compared with zero:stages < 0")