staging: fbtft: core: set smem_len before fb_deferred_io_init call
authorPeter Suti <peter.suti@streamunlimited.com>
Wed, 27 Jul 2022 07:35:50 +0000 (09:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jul 2022 08:42:42 +0000 (10:42 +0200)
commit81e878887ff82a7dd42f22951391069a5d520627
treea0aededad7853a827fd45b225a03dd26bb67f2b1
parent2b5002e2cc1483b6333d31e21902b78a1997909e
staging: fbtft: core: set smem_len before fb_deferred_io_init call

The fbtft_framebuffer_alloc() calls fb_deferred_io_init() before
initializing info->fix.smem_len.  It is set to zero by the
framebuffer_alloc() function.  It will trigger a WARN_ON() at the
start of fb_deferred_io_init() and the function will not do anything.

Fixes: 856082f021a2 ("fbdev: defio: fix the pagelist corruption")
Signed-off-by: Peter Suti <peter.suti@streamunlimited.com>
Link: https://lore.kernel.org/r/20220727073550.1491126-1-peter.suti@streamunlimited.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-core.c