net/nfp: check return value
authorAlejandro Lucero <alejandro.lucero@netronome.com>
Mon, 8 Apr 2019 09:59:49 +0000 (10:59 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 12 Apr 2019 09:02:02 +0000 (11:02 +0200)
commit0fec453d583c77fd0e7fb61a0284dc261f2b50e3
tree74f9fef7cb800a047629458ae0c5f7315b4054bc
parent3243f7c0d8e445fe7607a2dcac24bffffa830cae
net/nfp: check return value

Call to CPP read (nfp_cpp_readl()) can fail, return 0 on fail.

If the call to _nfp6000_cppat_mu_locality fails, the function needs
to return with an error.

If the nfp_cpp_readl() call fails just returns 0.

Coverity issue: 277209, 277215, 277225
Fixes: c7e9729da6b5 ("net/nfp: support CPP")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h
drivers/net/nfp/nfpcore/nfp_cppcore.c