Commit e7562597 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

nfp: double free on error in probe

Both the nfp_net_pf_app_start() and the nfp_net_pci_probe() functions
call nfp_net_pf_app_stop_ctrl(pf) so there is a double free.  The free
should be done from the probe function because it's allocated there so
I have removed the call from nfp_net_pf_app_start().

Fixes: 02082701 ("nfp: create control vNICs and wire up rx/tx")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent beae0413
...@@ -458,7 +458,7 @@ static int nfp_net_pf_app_start(struct nfp_pf *pf) ...@@ -458,7 +458,7 @@ static int nfp_net_pf_app_start(struct nfp_pf *pf)
err = nfp_app_start(pf->app, pf->ctrl_vnic); err = nfp_app_start(pf->app, pf->ctrl_vnic);
if (err) if (err)
goto err_ctrl_stop; return err;
if (pf->num_vfs) { if (pf->num_vfs) {
err = nfp_app_sriov_enable(pf->app, pf->num_vfs); err = nfp_app_sriov_enable(pf->app, pf->num_vfs);
...@@ -470,8 +470,6 @@ static int nfp_net_pf_app_start(struct nfp_pf *pf) ...@@ -470,8 +470,6 @@ static int nfp_net_pf_app_start(struct nfp_pf *pf)
err_app_stop: err_app_stop:
nfp_app_stop(pf->app); nfp_app_stop(pf->app);
err_ctrl_stop:
nfp_net_pf_app_stop_ctrl(pf);
return err; return err;
} }
......
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