Resent-Date: Fri, 27 Aug 1999 10:43:14 +0200 (MET DST) Date: Fri, 27 Aug 1999 10:42:50 +0200 (MET DST) From: Roman Zippel X-Sender: zippel@zeus To: Linux/m68k Subject: amifb fix Resent-From: linux-m68k@phil.uni-sb.de Hi, It might help that var is cleared, the comment in front of fb_find_mode() explicitly states, that it doesn't do it. The removed test below contains another nice bug (almost as funny as the ariadne bug, that Geert found :-) ). bye, Roman diff -ur linux-2.3.14/drivers/video/amifb.c linux-rtl/drivers/video/amifb.c --- drivers/video/amifb.c Fri Aug 20 21:14:08 1999 +++ drivers/video/amifb.c Fri Aug 27 01:00:46 1999 @@ -1736,15 +1737,11 @@ fb_info.updatevar = &amifbcon_updatevar; fb_info.blank = &amifbcon_blank; fb_info.flags = FBINFO_FLAG_DEFAULT; + memset(&var, 0, sizeof(var)); - if (mode_option) - if (!fb_find_mode(&var, &fb_info, mode_option, ami_modedb, - NUM_TOTAL_MODES, &ami_modedb[defmode], 4)) - panic("Can't find any usable video mode"); - else - if (!fb_find_mode(&var, &fb_info, "pal", ami_modedb, - NUM_TOTAL_MODES, &ami_modedb[defmode], 4)) - panic("Can't find any usable video mode"); + if (!fb_find_mode(&var, &fb_info, mode_option, ami_modedb, + NUM_TOTAL_MODES, &ami_modedb[defmode], 4)) + panic("Can't find any usable video mode"); round_down_bpp = 0; chipptr = chipalloc(videomemorysize+