Skip to content

Commit c9342d1

Browse files
srevinodkoul
authored andcommitted
phy: rockchip: usbdp: fix uninitialized variable
The ret variable may not be initialized in rk_udphy_usb3_phy_init(), if the PHY is not using USB3 mode. Since the DisplayPort part is handled separately and the PHY does not support USB2 (which is routed to another PHY on Rockchip RK3588), the right exit code for this case is 0. Thus let's initialize the variable accordingly. Fixes: 2f70bbd ("phy: rockchip: add usbdp combo phy driver") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Muhammad Usama Anjum <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent a1fe1ec commit c9342d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/phy/rockchip/phy-rockchip-usbdp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ static const struct phy_ops rk_udphy_dp_phy_ops = {
12851285
static int rk_udphy_usb3_phy_init(struct phy *phy)
12861286
{
12871287
struct rk_udphy *udphy = phy_get_drvdata(phy);
1288-
int ret;
1288+
int ret = 0;
12891289

12901290
mutex_lock(&udphy->mutex);
12911291
/* DP only or high-speed, disable U3 port */

0 commit comments

Comments
 (0)