]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Set PTP channel pointer explicitly to NULL
authorAya Levin <ayal@nvidia.com>
Tue, 12 Jan 2021 11:34:29 +0000 (13:34 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 10 Mar 2021 19:01:53 +0000 (11:01 -0800)
commit0b98a14e4e69c337cad3ada45ea67553f89f6b90
treea20360d18f15de5a8be655564f3c27dd84626bf8
parentea87d8a2497093dfea8e9f0a86b25165df7b0ff0
net/mlx5e: Set PTP channel pointer explicitly to NULL

When closing the PTP channel, set its pointer explicitly to NULL. PTP
channel is opened on demand, the code verify the pointer validity before
access. Nullify it when closing the PTP channel to avoid unexpected
behavior.

Fixes: 01b30438ab20 ("net/mlx5e: Add TX PTP port object support")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c