Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

viafb: fix accel_flags check_var bug

viafb: fix accel_flags check_var bug

In check_var we should check and modify the var given and not the
one which is currently active. So this code was obviously wrong.
Probably this was doing no harm because all acceleration functions
also check whether acceleration is possible. (otherwise I would
expect this to lead to a null pointer dereference)

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>

+2 -2
+2 -2
drivers/video/via/viafbdev.c
··· 216 216 217 217 /* Adjust var according to our driver's own table */ 218 218 viafb_fill_var_timing_info(var, viafb_refresh, vmode_entry); 219 - if (info->var.accel_flags & FB_ACCELF_TEXT && 219 + if (var->accel_flags & FB_ACCELF_TEXT && 220 220 !ppar->shared->vdev->engine_mmio) 221 - info->var.accel_flags = 0; 221 + var->accel_flags = 0; 222 222 223 223 return 0; 224 224 }