From: Geert Uytterhoeven Date: Thu, 18 Oct 2007 10:04:36 +0000 (-0700) Subject: fb modedb: Refactor confusing mode_option assignment X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c40eea98cd723ac8942ed2db39c30182c0c928c7;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git fb modedb: Refactor confusing mode_option assignment Signed-off-by: Geert Uytterhoeven Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index 42f5d76a8777..8d81ef019c6c 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c @@ -510,7 +510,9 @@ int fb_find_mode(struct fb_var_screeninfo *var, default_bpp = 8; /* Did the user specify a video mode? */ - if (mode_option || (mode_option = fb_mode_option)) { + if (!mode_option) + mode_option = fb_mode_option; + if (mode_option) { const char *name = mode_option; unsigned int namelen = strlen(name); int res_specified = 0, bpp_specified = 0, refresh_specified = 0;