]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
uvesafb: fix selecting mode with the vbemode option
authorMichal Januszewski <spock@gentoo.org>
Tue, 31 Mar 2009 22:25:41 +0000 (15:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Apr 2009 15:59:33 +0000 (08:59 -0700)
commit23b736545473ed853b685cbc03883aa6ff3f0e0d
treedbc04a8fc5765f6832085909e6b5247511c33fed
parentddb53d48da5b0e691f35e703ac29118747f86c99
uvesafb: fix selecting mode with the vbemode option

If the vbemode option is used, uvesafb calls fb_get_mode() without first
setting the resolution in info->var.  This results in a division by zero
in fb_get_mode(), as evidenced e.g.  in [1].  Fix this by ensuring the
info->var structure is populated before fb_get_mode() is called.

[1] http://bugzilla.kernel.org/show_bug.cgi?id=11661#c37

Signed-off-by: Michal Januszewski <spock@gentoo.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/uvesafb.c