Skip to content

Commit 57c0e13

Browse files
phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select()
In the wiz_mode_select() function, the configuration performed for PHY_TYPE_USXGMII is unreachable. Fix it. Fixes: b64a85f ("phy: ti: phy-j721e-wiz.c: Add usxgmii support in wiz driver") Signed-off-by: Siddharth Vadapalli <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 0cfa43a commit 57c0e13

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drivers/phy/ti/phy-j721e-wiz.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,18 +443,17 @@ static int wiz_mode_select(struct wiz *wiz)
443443
int i;
444444

445445
for (i = 0; i < num_lanes; i++) {
446-
if (wiz->lane_phy_type[i] == PHY_TYPE_DP)
446+
if (wiz->lane_phy_type[i] == PHY_TYPE_DP) {
447447
mode = LANE_MODE_GEN1;
448-
else if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII)
448+
} else if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII) {
449449
mode = LANE_MODE_GEN2;
450-
else
451-
continue;
452-
453-
if (wiz->lane_phy_type[i] == PHY_TYPE_USXGMII) {
450+
} else if (wiz->lane_phy_type[i] == PHY_TYPE_USXGMII) {
454451
ret = regmap_field_write(wiz->p0_mac_src_sel[i], 0x3);
455452
ret = regmap_field_write(wiz->p0_rxfclk_sel[i], 0x3);
456453
ret = regmap_field_write(wiz->p0_refclk_sel[i], 0x3);
457454
mode = LANE_MODE_GEN1;
455+
} else {
456+
continue;
458457
}
459458

460459
ret = regmap_field_write(wiz->p_standard_mode[i], mode);

0 commit comments

Comments
 (0)