Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <jiri@nvidia.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sagi Maimon and committed by
David S. Miller
97417cd7 a4255b2e

+1 -1
+1 -1
drivers/ptp/ptp_ocp.c
··· 4492 4492 cancel_delayed_work_sync(&bp->sync_work); 4493 4493 for (i = 0; i < OCP_SMA_NUM; i++) { 4494 4494 if (bp->sma[i].dpll_pin) { 4495 - dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, bp); 4495 + dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, &bp->sma[i]); 4496 4496 dpll_pin_put(bp->sma[i].dpll_pin); 4497 4497 } 4498 4498 }