Re: [PATCH] media: vimc: fix reference leak on failed device registration

From: Guangshuo Li

Date: Thu Apr 16 2026 - 05:11:44 EST


Hi Shuah,

Thanks for reviewing.

On Thu, 16 Apr 2026 at 04:49, Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On 4/15/26 10:56, Guangshuo Li wrote:
> > Hi Shuah,
> >
> > Thanks for reviewing.
> >
> > On Thu, 16 Apr 2026 at 00:01, Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> wrote:
> >>
> >
> >>
> >> Can you share your manual review?
> >>
> >> Can other static analysis tools for example scripts/coccinelle support
> >> your findings?
> >>
>
> Did you try other static analysis tools in the kernel?
>
I have not used other static analysis tools for this case.

> There are several calls to platform_device_register() all over the kernel.
> Did your tool find all other cases or just this one?
>
> thanks,
> -- Shuah

My tool also identified other similar issues in the kernel, and I have
posted corresponding patches for them, for example:

[PATCH] eeprom: digsy_mtc: fix reference leak on failed device registration
https://patchew.org/linux/20260415165203.3584869-1-lgs201920130244@xxxxxxxxx/

[PATCH] arm_pmu: acpi: fix reference leak on failed device registration
https://patchew.org/linux/20260415174159.3625777-1-lgs201920130244@xxxxxxxxx/

Thanks,
Guangshuo