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

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
...@@ -4492,7 +4492,7 @@ ptp_ocp_remove(struct pci_dev *pdev) ...@@ -4492,7 +4492,7 @@ ptp_ocp_remove(struct pci_dev *pdev)
cancel_delayed_work_sync(&bp->sync_work); cancel_delayed_work_sync(&bp->sync_work);
for (i = 0; i < OCP_SMA_NUM; i++) { for (i = 0; i < OCP_SMA_NUM; i++) {
if (bp->sma[i].dpll_pin) { 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); dpll_pin_put(bp->sma[i].dpll_pin);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment