Skip to content

Commit 38f13bf

Browse files
Choong Yong LiangPaolo Abeni
authored andcommitted
stmmac: intel: Fix warning message for return value in intel_tsn_lane_is_available()
Fix the warning "warn: missing error code? 'ret'" in the intel_tsn_lane_is_available() function. The function now returns 0 to indicate that a TSN lane was found and returns -EINVAL when it is not found. Fixes: a42f6b3 ("net: stmmac: configure SerDes according to the interface mode") Signed-off-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Reviewed-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250310050835.808870-1-yong.liang.choong@linux.intel.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent f2972ea commit 38f13bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,10 @@ static int intel_tsn_lane_is_available(struct net_device *ndev,
494494
if ((rbuf.buf[0] >>
495495
(4 * (intel_priv->tsn_lane_regs[j] % 8)) &
496496
B_PCH_FIA_PCR_L0O) == 0xB)
497-
return ret;
497+
return 0;
498498
}
499499

500-
return ret;
500+
return -EINVAL;
501501
}
502502

503503
static int intel_set_reg_access(const struct pmc_serdes_regs *regs, int max_regs)

0 commit comments

Comments
 (0)