mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
nfp: return nfp_rtsym_read_le() errors correctly
nfp_rtsym_read_le() has an out parameter for error codes. We have to use that instead of returning errors directly. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
af623682ac
commit
372d504575
1 changed files with 5 additions and 3 deletions
|
@ -269,8 +269,10 @@ u64 nfp_rtsym_read_le(struct nfp_cpp *cpp, const char *name, int *error)
|
|||
int err;
|
||||
|
||||
sym = nfp_rtsym_lookup(cpp, name);
|
||||
if (!sym)
|
||||
return -ENOENT;
|
||||
if (!sym) {
|
||||
err = -ENOENT;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
id = NFP_CPP_ISLAND_ID(sym->target, NFP_CPP_ACTION_RW, 0, sym->domain);
|
||||
|
||||
|
@ -294,7 +296,7 @@ u64 nfp_rtsym_read_le(struct nfp_cpp *cpp, const char *name, int *error)
|
|||
err = 0;
|
||||
else if (err >= 0)
|
||||
err = -EIO;
|
||||
|
||||
exit:
|
||||
if (error)
|
||||
*error = err;
|
||||
|
||||
|
|
Loading…
Reference in a new issue