mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
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: 3265f42188 ("net: phy: at803x: add fiber support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20221118103635.254256-1-weiyongjun@huaweicloud.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
badbda1a01
commit
1f0dd412e3
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user