fb modedb: Refactor confusing mode_option assignment
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Thu, 18 Oct 2007 10:04:36 +0000 (03:04 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 18 Oct 2007 21:37:17 +0000 (14:37 -0700)
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/modedb.c

index 42f5d76a87771134d421feafd84895abf4084ccb..8d81ef019c6c6f8de6a5eeb6013b061de650a649 100644 (file)
@@ -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;