Skip to content

Commit

Permalink
cirrusfb: do not allow unsupported pixel depth
Browse files Browse the repository at this point in the history
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 <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Krzysztof Helt authored and Linus Torvalds committed Apr 13, 2009
1 parent 697f619 commit 0efb2a0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/video/cirrusfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0efb2a0

Please sign in to comment.