octeontx2-af: Increment ptp refcount before use
authorSubbaraya Sundeep <sbhatta@marvell.com>
Fri, 7 Jan 2022 06:30:29 +0000 (12:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:03:59 +0000 (11:03 +0100)
commitc48c7678739d11e9982a435b9eb9fb0d68431129
treefc56dfbe2d38e07879636fc2479bfdad48a44242
parentaac0b364904fe81c8c16b7def3a28eaaef327e20
octeontx2-af: Increment ptp refcount before use

[ Upstream commit 93440f4888cf049dbd22b41aaf94d2e2153b3eb8 ]

Before using the ptp pci device by AF driver increment
the reference count of it.

Fixes: a8b90c9d26d6 ("octeontx2-af: Add PTP device id for CN10K and 95O silcons")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/ptp.c