Skip to content

Commit

Permalink
nfp: fix readq on absolute RTsyms
Browse files Browse the repository at this point in the history
Return the error and report value through the output param.

Fixes: 640917d ("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>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Sep 6, 2018
1 parent 9e7e6ca commit 3c576de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/netronome/nfp/nfpcore/nfp_rtsym.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3c576de

Please sign in to comment.