回复: [PATCH 08/10] phy: starfive: jh7110-dphy-rx: Set .owner = THIS_MODULE
From: Changhuang Liang
Date: Mon Nov 30 2026 - 20:25:09 EST
Hi, lan
Thanks for the patch.
> phy_get() and of_phy_get() call try_module_get(phy->ops->owner) to pin the
> PHY provider module while the PHY is in use, and of_phy_put() calls
> module_put(phy->ops->owner). Because phy->ops is const struct phy_ops *,
> phy_create() cannot populate ops->owner at runtime, and
> try_module_get(NULL) returns true without incrementing the module
> reference count.
>
> Set .owner = THIS_MODULE in stf_dphy_ops, found with Clang's
> require_explicit_initialization attribute.
>
> Fixes: f8aa660841bc ("phy: starfive: Add mipi dphy rx support")
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
Reviewed-by: Changhuang Liang <changhuang.liang@xxxxxxxxxxxxxxxx>
Best Regards,
Changhuang