]> git.ipfire.org Git - thirdparty/linux.git/commit
staging: fbtft: cleanup error handling in fbtft_framebuffer_alloc()
authorAbdun Nihaal <abdun.nihaal@gmail.com>
Tue, 1 Jul 2025 16:45:36 +0000 (22:15 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2025 11:11:07 +0000 (13:11 +0200)
commit3e92c919553c97ba77e84830417cbc62df5883c2
treeedf3d7f7d78693f1fb4298f750814fa1a75e7de3
parent505bffe2123323af1e9122583aafeb3a0700bf9c
staging: fbtft: cleanup error handling in fbtft_framebuffer_alloc()

The error handling in fbtft_framebuffer_alloc() mixes managed allocation
and plain allocation, and performs error handling in an order different
from the order in fbtft_framebuffer_release().

Fix them by moving vmem allocation closer to where it is used, and using
plain kzalloc() for txbuf allocation. Also remove the duplicate call to
fb_deferred_io_cleanup().

Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20250701164537.243282-1-abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-core.c