]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: double free on error in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 29 Aug 2017 19:15:16 +0000 (22:15 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Aug 2017 23:07:23 +0000 (16:07 -0700)
commitc836ae43635a7e86d0220b4d950bd2235cf69dc2
treea214f38a0e75cf1cb38f50c6c71d07195f0fea80
parent6b6c66cafbbf8b8b891b5766eeaf1dc22aeaa0dc
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: ea4af2484303 ("nfp: create control vNICs and wire up rx/tx")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_main.c