viafb: improve pitch handling
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Mon, 6 Jun 2011 01:27:34 +0000 (01:27 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:36:13 +0000 (09:36 -0800)
commit76ec8cdcca9f8fa8e2546ed96a2715a6654487ad
treeb4066d555e694fa042d610477f6b7aeeab9f80d8
parentcdf3e3448744d14b6307dfc7f7203cba6fecf199
viafb: improve pitch handling

commit 936a3f770b8de7042d793272f008ef1bb08522e9 upstream.

This patch adds checks for minimum and maximum pitch size to prevent
invalid settings which could otherwise crash the machine. Also the
alignment is done in a slightly more readable way.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/video/via/via_modesetting.h
drivers/video/via/viafbdev.c