Skip to content

Commit b0aae0b

Browse files
committed
octeontx2: Fix condition.
Fixes: 93efb0c ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()") Signed-off-by: David S. Miller <[email protected]>
1 parent 4b47ad0 commit b0aae0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ static int otx2_get_fecparam(struct net_device *netdev,
964964
if (IS_ERR(rsp))
965965
return PTR_ERR(rsp);
966966

967-
if (rsp->fwdata.supported_fec <= FEC_MAX_INDEX) {
967+
if (rsp->fwdata.supported_fec < FEC_MAX_INDEX) {
968968
if (!rsp->fwdata.supported_fec)
969969
fecparam->fec = ETHTOOL_FEC_NONE;
970970
else

0 commit comments

Comments
 (0)