From: Wang YanQing Date: Fri, 27 Dec 2013 02:39:18 +0000 (+0800) Subject: fbcon: trivial optimization for fbcon_exit X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=5aa133d6c83b151690d8c3216ea45dfbd4452fbe;p=deliverable%2Flinux.git fbcon: trivial optimization for fbcon_exit Break out as soon as we find a mapped entry con2fb_map. Signed-off-by: Wang YanQing Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index cd8a8027f8ae..f39931f818b8 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -3547,8 +3547,10 @@ static void fbcon_exit(void) "no")); for (j = first_fb_vc; j <= last_fb_vc; j++) { - if (con2fb_map[j] == i) + if (con2fb_map[j] == i) { mapped = 1; + break; + } } if (mapped) {