mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: 02082701b9 ("nfp: create control vNICs and wire up rx/tx")
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Jakub Kicinski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
beae041307
commit
e7562597b4
1 changed files with 1 additions and 3 deletions
|
|
@ -458,7 +458,7 @@ static int nfp_net_pf_app_start(struct nfp_pf *pf)
|
|||
|
||||
err = nfp_app_start(pf->app, pf->ctrl_vnic);
|
||||
if (err)
|
||||
goto err_ctrl_stop;
|
||||
return err;
|
||||
|
||||
if (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)
|
|||
|
||||
err_app_stop:
|
||||
nfp_app_stop(pf->app);
|
||||
err_ctrl_stop:
|
||||
nfp_net_pf_app_stop_ctrl(pf);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue