diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/fbtft/fbtft-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 0c1a77cafe14..ce4fd374c3d0 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -820,6 +820,8 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, /* Transmit buffer */ if (txbuflen == -1) txbuflen = vmem_size + 2; /* add in case startbyte is used */ + if (txbuflen >= vmem_size + 2) + txbuflen = 0; #ifdef __LITTLE_ENDIAN if ((!txbuflen) && (bpp > 8)) |