viafb: improve pitch handling
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Mon, 6 Jun 2011 01:27:34 +0000 (01:27 +0000)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sun, 17 Jul 2011 00:11:15 +0000 (00:11 +0000)
commit936a3f770b8de7042d793272f008ef1bb08522e9
tree3863e60ae9cf13e48ecf2bcb131c92bc9c2b848b
parentd933990c57b498c092ceef591c7c5d69dbfe9f30
viafb: improve pitch handling

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>
Cc: stable@kernel.org
drivers/video/via/via_modesetting.h
drivers/video/via/viafbdev.c