summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/netronome/nfp
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-09-04 07:37:31 -0700
committerDavid S. Miller <davem@davemloft.net>2018-09-05 22:17:07 -0700
commit3c576de30bb49a4821923928f85f13e957d1e47d (patch)
tree11bd7ba6dc5d3552fbade5785ea167cb3e5f3bfd /drivers/net/ethernet/netronome/nfp
parent9e7e6cabf371cc008cb2244a04c012b516753693 (diff)
nfp: fix readq on absolute RTsyms
Return the error and report value through the output param. Fixes: 640917dd81b6 ("nfp: support access to absolute RTsyms") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Francois H. Theron <francois.theron@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp')
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfpcore/nfp_rtsym.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_rtsym.c b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_rtsym.c
index 108ce8c5e68e..4003ed76a49a 100644
--- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_rtsym.c
+++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_rtsym.c
@@ -337,8 +337,10 @@ int __nfp_rtsym_readq(struct nfp_cpp *cpp, const struct nfp_rtsym *sym,
u64 addr;
int err;
- if (sym->type == NFP_RTSYM_TYPE_ABS)
- return sym->addr;
+ if (sym->type == NFP_RTSYM_TYPE_ABS) {
+ *value = sym->addr;
+ return 0;
+ }
err = nfp_rtsym_to_dest(cpp, sym, action, token, off, &cpp_id, &addr);
if (err)