cirrusfb: do not allow unsupported pixel depth

Do not allow modes with unsupported pixel depth.  Otherwise, one can hang
a computer by setting incorrect value with fbset command.

Signed-off-by: Krzysztof Helt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Krzysztof Helt 2009-04-13 14:39:55 -07:00 • committed by Linus Torvalds
commit 0efb2a03af

View file

@ -567,9 +567,7 @@ static int cirrusfb_check_var(struct fb_var_screeninfo *var,
default:
dev_dbg(info->device,
"Unsupported bpp size: %d\n", var->bits_per_pixel);
assert(false);
/* should never occur */
break;
return -EINVAL;
}
if (var->xres_virtual < var->xres)