mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-21 10:01:00 +00:00
octeontx2-af: Increment ptp refcount before use
[ Upstream commit93440f4888
] Before using the ptp pci device by AF driver increment the reference count of it. Fixes:a8b90c9d26
("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>
This commit is contained in:
parent
aac0b36490
commit
c48c767873
1 changed files with 2 additions and 0 deletions
|
@ -85,6 +85,8 @@ struct ptp *ptp_get(void)
|
|||
/* Check driver is bound to PTP block */
|
||||
if (!ptp)
|
||||
ptp = ERR_PTR(-EPROBE_DEFER);
|
||||
else
|
||||
pci_dev_get(ptp->pdev);
|
||||
|
||||
return ptp;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue