octeontx2: Fix condition.
commit b0aae0bde26f276401640e05e81a8a0ce3d8f70e upstream. Fixes: 93efb0c656837 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()") Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
68a21184eb
commit
c6ba8a5b1b
1 changed files with 1 additions and 1 deletions
|
@ -801,7 +801,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
|
||||
|
|
Loading…
Reference in a new issue