Skip to contentSkip to conversation

ptp: fix PTP PPS source's lookup cookie set

PATCH In review Dario Binacchi 3 participants 4 messages Jul 8, 2021

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

PATCH 1/1 ptp: fix PTP PPS source's lookup cookie set

The setting took place before the PTP PPS source was registered, so ptp->pps_source was NULL.

Fixes 8602e40fc813 ("ptp: Set lookup cookie when creating a PTP PPS source.")

---

 drivers/ptp/ptp_clock.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ptp/ptp_clock.c +2 -1
index a23a37a4d5dc..457129c07221 100644
@@ -218,7 +218,6 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
 			pr_err("failed to create ptp aux_worker %d\n", err);
 			goto kworker_err;
 		}
-		ptp->pps_source->lookup_cookie = ptp;
 	}
 
 	err = ptp_populate_pin_groups(ptp);
@@ -238,6 +237,8 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
 			pr_err("failed to register pps source\n");
 			goto no_pps;
 		}
+
+		ptp->pps_source->lookup_cookie = ptp;
 	}
 
 	/* Initialize a new device of our class in our clock structure. */
Signature · 1 line
2.17.1
maintainer
#1 lore raw

this pastch does not apply to the current net tree, that is why I keep marking it "Not Applicable" in patchwork.

#2 lore raw

Hi David,

Quoted 5 lines

Il 08/07/2021 09:14 David Miller <[email protected]> ha scritto:

this pastch does not apply to the current net tree, that is why I keep marking it "Not Applicable" in patchwork.

I applied and tested the patch this morning on the mainline kernel. What am I missing? Should I wait for the merge windows to end?

Thanks and regards,
Dario

#3 lore raw
In reply to David Miller
Quoted 2 lines · David Miller

this pastch does not apply to the current net tree, that is why I keep marking it "Not Applicable" in patchwork.

I'll send a patch against -net in a minue. The earlier ones were against -net-next, I didn't realize the window closed.

Signature · 1 line
Jonathan