octeontx2: Fix condition.
Fixes: 93efb0c656
("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()")
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4b47ad0079
commit
b0aae0bde2
1 changed files with 1 additions and 1 deletions
|
@ -964,7 +964,7 @@ static int otx2_get_fecparam(struct net_device *netdev,
|
||||||
if (IS_ERR(rsp))
|
if (IS_ERR(rsp))
|
||||||
return PTR_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)
|
if (!rsp->fwdata.supported_fec)
|
||||||
fecparam->fec = ETHTOOL_FEC_NONE;
|
fecparam->fec = ETHTOOL_FEC_NONE;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue