Skip to content

Commit

Permalink
stmmac: intel: Fix warning message for return value in intel_tsn_lane…
Browse files Browse the repository at this point in the history
…_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>
  • Loading branch information
Choong Yong Liang authored and Paolo Abeni committed Mar 17, 2025
1 parent f2972ea commit 38f13bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,10 @@ static int intel_tsn_lane_is_available(struct net_device *ndev,
if ((rbuf.buf[0] >>
(4 * (intel_priv->tsn_lane_regs[j] % 8)) &
B_PCH_FIA_PCR_L0O) == 0xB)
return ret;
return 0;
}

return ret;
return -EINVAL;
}

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

0 comments on commit 38f13bf

Please sign in to comment.