diff options
| author | Dave Airlie <airlied@redhat.com> | 2023-06-19 15:59:52 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2023-06-19 16:01:25 +1000 |
| commit | cce3b573a52a41dd7face9dbf745f10f9bf4632b (patch) | |
| tree | 4540c11587221cfb90ac9cfb7916b2d2c17c6127 /drivers/net/macsec.c | |
| parent | bcbede6fbeb0e1eb85ccbb532faf06d3b31f0e73 (diff) | |
| parent | 45a3e24f65e90a047bef86f927ebdc4c710edaa1 (diff) | |
Backmerge tag 'v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Linux 6.4-rc7
Need this to pull in the msm work.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/net/macsec.c')
| -rw-r--r-- | drivers/net/macsec.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index 3427993f94f7..984dfa5d6c11 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macsec.c @@ -3997,17 +3997,15 @@ static int macsec_add_dev(struct net_device *dev, sci_t sci, u8 icv_len) return -ENOMEM; secy->tx_sc.stats = netdev_alloc_pcpu_stats(struct pcpu_tx_sc_stats); - if (!secy->tx_sc.stats) { - free_percpu(macsec->stats); + if (!secy->tx_sc.stats) return -ENOMEM; - } secy->tx_sc.md_dst = metadata_dst_alloc(0, METADATA_MACSEC, GFP_KERNEL); - if (!secy->tx_sc.md_dst) { - free_percpu(secy->tx_sc.stats); - free_percpu(macsec->stats); + if (!secy->tx_sc.md_dst) + /* macsec and secy percpu stats will be freed when unregistering + * net_device in macsec_free_netdev() + */ return -ENOMEM; - } if (sci == MACSEC_UNDEF_SCI) sci = dev_to_sci(dev, MACSEC_PORT_ES); |