[PATCH v3 0/2] staging: fbtft: cleanup fbtft_framebuffer_alloc()

Abdun Nihaal posted 2 patches 3 months, 1 week ago
There is a newer version of this series
drivers/staging/fbtft/fbtft-core.c | 38 +++++++++++++++++-------------
1 file changed, 21 insertions(+), 17 deletions(-)
[PATCH v3 0/2] staging: fbtft: cleanup fbtft_framebuffer_alloc()
Posted by Abdun Nihaal 3 months, 1 week ago
Fix a potential memory leak and cleanup error handling in
fbtft_framebuffer_alloc().

v3:
- Remove a redundant check before calling kfree

v2:
- Change the earlier patch to also handle the error code returned by
  fb_deferred_io_init() and update Fixes tag to point to the commit that
  introduced the memory allocation (which leads to leak).
- Add second patch to make the error handling order symmetric to
  fbtft_framebuffer_release() and also remove managed allocation for
  txbuf as suggested by Andy and Dan.

Link to v2: https://lore.kernel.org/linux-staging/cover.1751086324.git.abdun.nihaal@gmail.com/T/#md111471ddd69e6ddb0a6b98e565551ffbd791a34
Link to v1: https://lore.kernel.org/all/20250626172412.18355-1-abdun.nihaal@gmail.com/

Abdun Nihaal (2):
  staging: fbtft: fix potential memory leak in fbtft_framebuffer_alloc()
  staging: fbtft: cleanup error handling in fbtft_framebuffer_alloc()

 drivers/staging/fbtft/fbtft-core.c | 38 +++++++++++++++++-------------
 1 file changed, 21 insertions(+), 17 deletions(-)

-- 
2.43.0
Re: [PATCH v3 0/2] staging: fbtft: cleanup fbtft_framebuffer_alloc()
Posted by Dan Carpenter 3 months, 1 week ago
On Sun, Jun 29, 2025 at 08:10:09PM +0530, Abdun Nihaal wrote:
> Fix a potential memory leak and cleanup error handling in
> fbtft_framebuffer_alloc().
> 

Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>

regards,
dan carpenter
Re: [PATCH v3 0/2] staging: fbtft: cleanup fbtft_framebuffer_alloc()
Posted by Andy Shevchenko 3 months, 1 week ago
On Sun, Jun 29, 2025 at 08:10:09PM +0530, Abdun Nihaal wrote:
> Fix a potential memory leak and cleanup error handling in
> fbtft_framebuffer_alloc().

Both looks okay to me now.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko