[Linux-stm32] [PATCH] i2c: stm32f7: prevent array underflow in stm32f7_get_lower_rate()

Wolfram Sang wsa at the-dreams.de
Thu Apr 30 14:07:12 UTC 2020


On Wed, Apr 29, 2020 at 04:23:23PM +0300, Dan Carpenter wrote:
> We want to break with "i" set to zero whether we find the rate we want
> or not.  In the current code, if we don't find the rate we want then it
> exits the loop with "i" set to -1 and results in an array underflow.
> 
> Fixes: 09cc9a3bce91 ("i2c: stm32f7: allows for any bus frequency")
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

Applied to for-next, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://st-md-mailman.stormreply.com/pipermail/linux-stm32/attachments/20200430/38eff053/attachment.sig>


More information about the Linux-stm32 mailing list