From: surendra lynx_10g_set_mode() currently ignores failures from lynx_10g_lane_enable_pcvt(). It then updates the lane mode and reports success even though the protocol converter may remain disabled. Propagate the error and leave the previous lane mode intact so the caller can handle the failed reconfiguration. Signed-off-by: surendra --- drivers/phy/freescale/phy-fsl-lynx-10g.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/phy/freescale/phy-fsl-lynx-10g.c b/drivers/phy/freescale/phy-fsl-lynx-10g.c index 38def160ef1a..9740b08700c4 100644 --- a/drivers/phy/freescale/phy-fsl-lynx-10g.c +++ b/drivers/phy/freescale/phy-fsl-lynx-10g.c @@ -1231,7 +1231,9 @@ static int lynx_10g_set_mode(struct phy *phy, enum phy_mode mode, int submode) lynx_10g_lane_change_proto_conf(lane, lane_mode); lynx_10g_lane_remap_pll(lane, lane_mode); - WARN_ON(lynx_10g_lane_enable_pcvt(lane, lane_mode)); + err = lynx_10g_lane_enable_pcvt(lane, lane_mode); + if (err) + goto out; lane->mode = lane_mode; -- 2.55.0