| .. | .. |
|---|
| 2513 | 2513 | h > FBCON_SWAP(info->var.rotate, info->var.yres, info->var.xres)) |
|---|
| 2514 | 2514 | return -EINVAL; |
|---|
| 2515 | 2515 | |
|---|
| 2516 | + if (font->width > 32 || font->height > 32) |
|---|
| 2517 | + return -EINVAL; |
|---|
| 2518 | + |
|---|
| 2516 | 2519 | /* Make sure drawing engine can handle the font */ |
|---|
| 2517 | | - if (!(info->pixmap.blit_x & (1 << (font->width - 1))) || |
|---|
| 2518 | | - !(info->pixmap.blit_y & (1 << (font->height - 1)))) |
|---|
| 2520 | + if (!(info->pixmap.blit_x & BIT(font->width - 1)) || |
|---|
| 2521 | + !(info->pixmap.blit_y & BIT(font->height - 1))) |
|---|
| 2519 | 2522 | return -EINVAL; |
|---|
| 2520 | 2523 | |
|---|
| 2521 | 2524 | /* Make sure driver can handle the font length */ |
|---|