]> git.baikalelectronics.ru Git - kernel.git/commit
drm/gma500/oaktrail_lvds: replace continue with break
authorColin Ian King <colin.king@canonical.com>
Fri, 18 Jun 2021 18:35:24 +0000 (19:35 +0100)
committerPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Fri, 18 Jun 2021 19:17:20 +0000 (21:17 +0200)
commit6b5cc00195fca4bca6a6744da5d2027e82788cfa
tree625afd009ddb2b7facad40691c5bc5a9dd1ff6d7
parent8dc241ee4fa864f9ea515167c5b3cdc9df9c1929
drm/gma500/oaktrail_lvds: replace continue with break

Currently a loop scans through the connector list checking
for connectors that do not match a specific criteria. The
use of the continue statement is a little unintuitive and
can confuse static analysis checking.  Invert the criteria
matching logic and use a break to terminate the loop once
the first suitable connector has been found.

Thanks to Patrik Jakobsson for explaining the original
intent of the code and suggesting this change.

Addresses-Coverity: ("Continue has no effect")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210618183524.590186-1-colin.king@canonical.com
drivers/gpu/drm/gma500/oaktrail_lvds.c