Skip to contentSkip to conversation

ptp: ocp: fix bug in unregistering the DPLL subsystem

PATCH Applied Sagi Maimon 4 participants 4 messages Dec 20, 2023 – Dec 29, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/ptp/ptp_ocp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ptp/ptp_ocp.c +1 -1
index 4021d3d325f9..e7defce8cf48 100644
@@ -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);
 		}
 	}
Signature · 1 line
2.26.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Wed, Dec 20, 2023 at 09:19:14AM CET, [email protected] wrote:

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")
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Sagi Maimon
Quoted 13 lines · Sagi Maimon

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")
---
  drivers/ptp/ptp_ocp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ptp/ptp_ocp.c +0 -0
index 4021d3d325f9..e7defce8cf48 100644

drivers/ptp/ptp_ocp.c ptp_ocp_remove(struct pci_dev *pdev) · line 4498

Quoted 8 lines
drivers/ptp/ptp_ocp.c +1 -1
@@ -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);
  		}
  	}
#3 lore raw
In reply to Sagi Maimon
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

Quoted 7 lines · On Wed, 20 Dec 2023 10:19:14 +0200 you wrote:

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")
---
 drivers/ptp/ptp_ocp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [v1] ptp: ocp: fix bug in unregistering the DPLL subsystem

    https://git.kernel.org/netdev/net/c/97417cd79ce1

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html