Re: soc: mediatek: SVS: fix device reference leak in svs_add_device_link()
From: Markus Elfring
Date: Sun Oct 25 2026 - 07:43:32 EST
…
> __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