提交 0efb2a03 编写于 作者: K Krzysztof Helt 提交者: Linus Torvalds

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: NKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 697f619f
...@@ -567,9 +567,7 @@ static int cirrusfb_check_var(struct fb_var_screeninfo *var, ...@@ -567,9 +567,7 @@ static int cirrusfb_check_var(struct fb_var_screeninfo *var,
default: default:
dev_dbg(info->device, dev_dbg(info->device,
"Unsupported bpp size: %d\n", var->bits_per_pixel); "Unsupported bpp size: %d\n", var->bits_per_pixel);
assert(false); return -EINVAL;
/* should never occur */
break;
} }
if (var->xres_virtual < var->xres) if (var->xres_virtual < var->xres)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册