Re: [PATCH] media: malic55: Fix possible ERR_PTR deference in enable_streams

From: Jacopo Mondi

Date: Fri Mar 06 2026 - 04:00:51 EST


Hi Alper,

On Fri, Mar 06, 2026 at 09:31:22AM +0300, Alper Ak wrote:
> Hello everyone, look like this patch hasn't been applied. Did I miss
> something I needed to do to get it applied? If there is anything I
> need to do, please let me know.

No, I think it's good.

The only think I see is my comment

As per the other patch for the CRU, it might be nice to attribute
credit to the static analysis tool you have used.

which makes me think there was a discussion on another patch about the
tool.

If you wish to resend to add credit, you're welcome to do so.

Otherwise, patches are collected in the media tree before the current
-rc6 (usually) so seat back and relax it might still take a while.

>
>
> Markus Elfring <Markus.Elfring@xxxxxx>, 14 Şub 2026 Cmt, 17:37
> tarihinde şunu yazdı:
> >
> > …
> > > pointer or an ERR_PTR() on failure …
> >
> > error pointer
> >
> >
> > > Add proper error checking with IS_ERR() before dereferencing the
> > > pointer. Also set isp->remote_src to NULL on error to maintain
> > > consistency with other error paths in the function.
> > …
> >
> > * See also once more:
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v6.19#n34
> >
> > * Were any source code analysis tools involved here?
> >
> > * Would a summary phrase like “Prevent error pointer dereference
> > in mali_c55_isp_enable_streams()” be more appropriate?
> >
> >
> > Regards,
> > Markus
> >