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

Abdun Nihaal abdun.nihaal at gmail.com
Sun Jun 29 14:23:12 UTC 2025


On Sat, Jun 28, 2025 at 10:58:20PM +0300, Andy Shevchenko wrote:
> > +       struct fbtft_par *par = info->par;
> > +
> > +       if (par->txbuf.len > 0)
> 
> Do we really need this check? If txbuf.buf is kept NULL (please, check
> this), the kfree() is NULL-aware.

I assumed that the par->txbuf.buf may be uninitialized, but I checked it
now and it uses kzalloc to allocate, so it must be NULL to begin with.

I'll remove the check, and send a v3.

Regards,
Nihaal


More information about the dri-devel mailing list