[PATCH 05/10] phy: google: usb: Set .owner = THIS_MODULE

André Draszik andre.draszik at linaro.org
Wed Dec 2 01:37:01 PST 2026


On Mon, 2026-11-30 at 14:54 -0800, Ian Rogers wrote:
> 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 google_usb2_phy_ops and google_usb3_phy_ops,
> found with Clang's require_explicit_initialization attribute.
> 
> Fixes: cbce66669c82 ("phy: Add Google Tensor SoC USB PHY driver")
> Fixes: 8c2b331e6327 ("phy: Add USB3 PHY support to Google Tensor SoC USB PHY driver")
> Signed-off-by: Ian Rogers <irogers at google.com>
> ---
>  drivers/phy/phy-google-usb.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: André Draszik <andre.draszik at linaro.org>



More information about the linux-arm-kernel mailing list