Re: soc: mediatek: SVS: fix device reference leak in svs_add_device_link()
From: Coia Prant
Date: Sun Oct 25 2026 - 07:47:25 EST
On October 25, 2026 7:42:51 PM GMT+08:00, Markus Elfring <Markus.Elfring@xxxxxx> wrote:
>…
>> __free(), DEFINE_FREE() and return_ptr() only appeared in v6.5, while
>> this driver dates back to v5.19 and the fix is tagged for stable (first
>> LTS is v6.1). Converting to scope-based cleanup here would not compile
>> on 6.1.y and would force the stable team to rewrite the backport.
>>
>> So I'd prefer to keep the explicit put_device() in this patch and leave
>> the __free(put_device) conversion to whoever owns the driver, as a
>> separate cleanup when the stable backport is no longer a concern.
>
>Would you eventually like to become more involved with corresponding
>source code transformations?
>
>Regards,
>Markus
Hi Markus,
Thanks, that's kind of you. I'll keep it in mind, but I can't promise
consistent bandwidth — my kernel time comes in bursts.
PCS is where most of my remaining TODO list is, so that's where I'll
spend the next chunk of time. If I get through that and still have room,
I'll take a look at the other device_link_add() call sites that have the
same missing-put_device pattern. There seem to be a few.
Regards,
Coia