diff options
author | David Lechner <david@lechnology.com> | 2017-08-18 20:56:40 +0300 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-08-18 20:56:40 +0300 |
commit | 16622a8e7e46fab31fd33ca5a23672385de240f6 (patch) | |
tree | b9044243c7f0b578a962245dd287205104f62cda /drivers/video/fbdev/core | |
parent | b0d8e409c3626eae42b59a3d76574804f2cef5ef (diff) | |
download | linux-16622a8e7e46fab31fd33ca5a23672385de240f6.tar.xz |
fbdev: fix 1bpp logo for unusual width
This check is needed in the case where the width of the framebuffer
is not a multiple of 8 pixels. For example, LEGO MINDSTORMS EV3 has
a 178x128 1bpp display.
Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev/core')
-rw-r--r-- | drivers/video/fbdev/core/fbmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index f8ced1434edf..a35f788b778b 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -316,7 +316,7 @@ static void fb_set_logo(struct fb_info *info, for (i = 0; i < logo->height; i++) { for (j = 0; j < logo->width; src++) { d = *src ^ xor; - for (k = 7; k >= 0; k--) { + for (k = 7; k >= 0 && j < logo->width; k--) { *dst++ = ((d >> k) & 1) ? fg : 0; j++; } |