]> git.baikalelectronics.ru Git - kernel.git/commit
drm/omap: pll: fix iteration loop check
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 15 Dec 2020 10:46:31 +0000 (12:46 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 15 Dec 2020 14:17:30 +0000 (16:17 +0200)
commit11f151ac57723297c462492f36338920f07f9697
tree77e760df600995affdc71adc294aa341a88224ec
parent8487f42d331832008960bb6a06d31f529228e8bc
drm/omap: pll: fix iteration loop check

If the PLL calc function is given bad parameters, n_start/m_start may be
higher than n_stop/m_stop, which leads to the loops iterating through
the whole u32 number space.

Fix this by failing early on such cases.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215104657.802264-59-tomi.valkeinen@ti.com
drivers/gpu/drm/omapdrm/dss/pll.c