]> git.baikalelectronics.ru Git - kernel.git/commit
drm/exynos: fix a timeout loop
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Jan 2017 16:54:32 +0000 (17:54 +0100)
committerInki Dae <inki.dae@samsung.com>
Mon, 30 Jan 2017 23:50:30 +0000 (08:50 +0900)
commita351486dab62b59bd2036b5d08d7a7bf52e04599
tree01efae5faec3ce8103da8a5e5907d71912331a62
parent90a14cddbfc07fd72b12230a5d73ce64a5800284
drm/exynos: fix a timeout loop

We were trying to print an error message if we timed out here, but the
loop actually ends with "tries" set to UINT_MAX and not zero.  Fix this
by changing from tries-- to --tries.

A for loop would actually be the most natural way to do this.  My fix
means we only loop 99 times instead of 100 but that's probably ok.

Fixes: 481b401b9d21 ('drm/exynos: mixer: simplify loop in vp_win_reset()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_mixer.c