Commit 965dd27d authored by Yinjun Zhang's avatar Yinjun Zhang Committed by Jakub Kicinski

nfp: avoid halt of driver init process when non-fatal error happens

It's not a fatal error when setting `hwinfo` into management firmware
fails, no need to halt the whole driver initialization process.
Signed-off-by: default avatarYinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fc26e70f
...@@ -315,18 +315,17 @@ static int nfp_net_pf_cfg_nsp(struct nfp_pf *pf, bool sp_indiff) ...@@ -315,18 +315,17 @@ static int nfp_net_pf_cfg_nsp(struct nfp_pf *pf, bool sp_indiff)
int err; int err;
nsp = nfp_nsp_open(pf->cpp); nsp = nfp_nsp_open(pf->cpp);
if (IS_ERR(nsp)) { if (IS_ERR(nsp))
err = PTR_ERR(nsp); return PTR_ERR(nsp);
return err;
}
snprintf(hwinfo, sizeof(hwinfo), "sp_indiff=%d", sp_indiff); snprintf(hwinfo, sizeof(hwinfo), "sp_indiff=%d", sp_indiff);
err = nfp_nsp_hwinfo_set(nsp, hwinfo, sizeof(hwinfo)); err = nfp_nsp_hwinfo_set(nsp, hwinfo, sizeof(hwinfo));
/* Not a fatal error, no need to return error to stop driver from loading */
if (err) if (err)
nfp_warn(pf->cpp, "HWinfo(sp_indiff=%d) set failed: %d\n", sp_indiff, err); nfp_warn(pf->cpp, "HWinfo(sp_indiff=%d) set failed: %d\n", sp_indiff, err);
nfp_nsp_close(nsp); nfp_nsp_close(nsp);
return err; return 0;
} }
static int nfp_net_pf_init_nsp(struct nfp_pf *pf) static int nfp_net_pf_init_nsp(struct nfp_pf *pf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment