diff options
Diffstat (limited to 'drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h')
-rw-r--r-- | drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h b/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h index 6e380cca..538f882b 100644 --- a/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h +++ b/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h @@ -368,6 +368,9 @@ _nfp6000_encode_mu(uint64_t *addr, int dest_island, int mode, int addr40, isld[1] = isld1; locality_lsb = _nfp6000_cppat_mu_locality_lsb(mode, addr40); + if (locality_lsb < 0) + return NFP_ERRNO(EINVAL); + if (((*addr >> locality_lsb) & 3) == _NIC_NFP6000_MU_LOCALITY_DIRECT) da = 1; else |