Skip to content

Commit

Permalink
fb modedb: Refactor confusing mode_option assignment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed Oct 18, 2007
1 parent 75e8b71 commit c40eea9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/video/modedb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c40eea9

Please sign in to comment.