viafb: fix ioremap_nocache error handling
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Tue, 22 Sep 2009 23:47:15 +0000 (16:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2009 14:39:51 +0000 (07:39 -0700)
commitbc6932bb4a25ced97c4f201874573e6097237b78
treef7bc89b68a935d1951c086aa692fd62319b420b8
parent09cf11806e4b4be92af76253ff9834c48b416129
viafb: fix ioremap_nocache error handling

Correct the returned error code for remapping the video framebuffer.
Introduce error handling for remapping MMIO register address space to
avoid a NULL pointer dereference.  Disable hardware acceleration if
remapping MMIO register address space failed as those registers are only
used for hardware acceleration.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/via/viafbdev.c