Skip to content

Commit e0c9244

Browse files
claudiubezneagregkh
authored andcommitted
usb: renesas_usbhs: Use devm_usb_get_phy()
The gpriv->transceiver is retrieved in probe() through usb_get_phy() but never released. Use devm_usb_get_phy() to handle this scenario. This issue was identified through code investigation. No issue was found without this change. Fixes: b5a2875 ("usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS") Cc: stable <stable@kernel.org> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://lore.kernel.org/r/20250225110248.870417-3-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b5ea08a commit e0c9244

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/renesas_usbhs/mod_gadget.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
10941094
goto usbhs_mod_gadget_probe_err_gpriv;
10951095
}
10961096

1097-
gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED);
1097+
gpriv->transceiver = devm_usb_get_phy(dev, USB_PHY_TYPE_UNDEFINED);
10981098
dev_info(dev, "%stransceiver found\n",
10991099
!IS_ERR(gpriv->transceiver) ? "" : "no ");
11001100

0 commit comments

Comments
 (0)