On Thu, Oct 18, 2018 at 12:02:50PM +0200, Boris Brezillon wrote:
The calculated ideal rate can easily overflow an unsigned long, thus making the best div selection buggy as soon as no ideal match is found before the overflow occurs.
Fixes: 4731a72df273 ("drm/sun4i: request exact rates to our parents") Cc: stable@vger.kernel.org Signed-off-by: Boris Brezillon boris.brezillon@bootlin.com Acked-by: Maxime Ripard maxime.ripard@bootlin.com
Changes in v2:
- Add a comment to explain why we bail out after an overflow
- Add Maxime ack
- Use a goto instead of a break
APplied, thanks! Maxime