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 <[email protected]> Signed-off-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent fff6352 commit 93440f4

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/ethernet/marvell/octeontx2/af

1 file changed

+2
-0
lines changed

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)