From: Sagi Maimon Date: Wed, 20 Dec 2023 08:19:14 +0000 (+0200) Subject: ptp: ocp: fix bug in unregistering the DPLL subsystem X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=97417cd79ce179a774b245a3f5535cc3fbbaee50;p=linux.git ptp: ocp: fix bug in unregistering the DPLL subsystem When unregistering the DPLL subsystem the priv pointer is different then the one used for registration which cause failure in unregistering. Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops") Reviewed-by: Jiri Pirko Reviewed-by: Vadim Fedorenko Signed-off-by: David S. Miller --- diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c index 4021d3d325f95..e7defce8cf48e 100644 --- a/drivers/ptp/ptp_ocp.c +++ b/drivers/ptp/ptp_ocp.c @@ -4492,7 +4492,7 @@ ptp_ocp_remove(struct pci_dev *pdev) cancel_delayed_work_sync(&bp->sync_work); for (i = 0; i < OCP_SMA_NUM; i++) { if (bp->sma[i].dpll_pin) { - dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, bp); + dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, &bp->sma[i]); dpll_pin_put(bp->sma[i].dpll_pin); } }