]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Cleanup MACsec uninitialization routine
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 20 Oct 2022 05:28:28 +0000 (08:28 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Oct 2022 09:29:14 +0000 (10:29 +0100)
commit331198cb090b521fc9614e3cc79dc239757878c1
treec2b324569c5d5139c9eef152dc1a4a6b4d43184c
parent2bf1bf5b59ec1520a67c5213de28d9e7676fea89
net/mlx5e: Cleanup MACsec uninitialization routine

The mlx5e_macsec_cleanup() routine has NULL pointer dereferencing if mlx5
device doesn't support MACsec (priv->macsec will be NULL).

While at it delete comment line, assignment and extra blank lines, so fix
everything in one patch.

Fixes: 166a0c23fe87 ("net/mlx5e: Create advanced steering operation (ASO) object for MACsec")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c