Skip to content

Commit 93440f4

Browse files
Subbaraya Sundeepdavem330
authored andcommitted
octeontx2-af: Increment ptp refcount before use
Before using the ptp pci device by AF driver increment the reference count of it. Fixes: a8b90c9 ("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>
1 parent fff6352 commit 93440f4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • drivers/net/ethernet/marvell/octeontx2/af

drivers/net/ethernet/marvell/octeontx2/af/ptp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ struct ptp *ptp_get(void)
6060
/* Check driver is bound to PTP block */
6161
if (!ptp)
6262
ptp = ERR_PTR(-EPROBE_DEFER);
63+
else
64+
pci_dev_get(ptp->pdev);
6365

6466
return ptp;
6567
}

0 commit comments

Comments
 (0)