Commit 97417cd7 authored by Sagi Maimon's avatar Sagi Maimon Committed by David S. Miller
Browse files

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: 09eeb3ae ("ptp_ocp: implement DPLL ops")
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Reviewed-by: default avatarVadim Fedorenko <vadim.fedorenko@linux.dev>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a4255b2e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
		}
	}