[PATCH v3 2/2] staging: fbtft: cleanup error handling in fbtft_framebuffer_alloc()
Greg KH
gregkh at linuxfoundation.org
Mon Jun 30 17:16:38 UTC 2025
On Sun, Jun 29, 2025 at 08:10:11PM +0530, Abdun Nihaal wrote:
> 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.
>
> Suggested-by: Andy Shevchenko <andriy.shevchenko at intel.com>
> Suggested-by: Dan Carpenter <dan.carpenter at linaro.org>
> Signed-off-by: Abdun Nihaal <abdun.nihaal at gmail.com>
> ---
> v2->v3:
> - Remove the if check before kfree of txbuf.buf, because it is zero
> initialized on allocation, and kfree is NULL aware.
This patch does not apply to my tree, can you rebase and resend?
thanks,
greg k-h
More information about the dri-devel
mailing list