diff options
author | David S. Miller <davem@davemloft.net> | 2021-02-13 03:56:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-13 03:56:08 +0300 |
commit | b0aae0bde26f276401640e05e81a8a0ce3d8f70e (patch) | |
tree | 9c5d49219d8b23b352e043fcdcbf2acaead4138f /drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | |
parent | 4b47ad0079f064a5b62c23e6301d034203bcc32e (diff) | |
download | linux-b0aae0bde26f276401640e05e81a8a0ce3d8f70e.tar.xz |
octeontx2: Fix condition.
Fixes: 93efb0c656837 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()")
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c index f7e8ada32a26..5fe74036a611 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c @@ -964,7 +964,7 @@ static int otx2_get_fecparam(struct net_device *netdev, if (IS_ERR(rsp)) return PTR_ERR(rsp); - if (rsp->fwdata.supported_fec <= FEC_MAX_INDEX) { + if (rsp->fwdata.supported_fec < FEC_MAX_INDEX) { if (!rsp->fwdata.supported_fec) fecparam->fec = ETHTOOL_FEC_NONE; else |