Thread (11 messages) flat view 11 messages, 5 authors, 2025-07-01

Re: [PATCH v3 2/2] staging: fbtft: cleanup error handling in fbtft_framebuffer_alloc()

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2025-06-30 17:16:41
Also in: dri-devel, linux-staging, lkml

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 <redacted>
Suggested-by: Dan Carpenter <redacted>
Signed-off-by: Abdun Nihaal <redacted>
---
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help