Commit b0aae0bd authored by David S. Miller's avatar David S. Miller
Browse files

octeontx2: Fix condition.



Fixes: 93efb0c6 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4b47ad00
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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