提交 1f0dd412 编写于 作者: W Wei Yongjun 提交者: Jakub Kicinski

net: phy: at803x: fix error return code in at803x_probe()

Fix to return a negative error code from the ccr read error handling
case instead of 0, as done elsewhere in this function.

Fixes: 3265f421 ("net: phy: at803x: add fiber support")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20221118103635.254256-1-weiyongjun@huaweicloud.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 badbda1a
......@@ -870,8 +870,10 @@ static int at803x_probe(struct phy_device *phydev)
.wolopts = 0,
};
if (ccr < 0)
if (ccr < 0) {
ret = ccr;
goto err;
}
mode_cfg = ccr & AT803X_MODE_CFG_MASK;
switch (mode_cfg) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册