From: Dario Binacchi <dariobin@libero.it>
To: linux-kernel@vger.kernel.org
Cc: Dario Binacchi <dariobin@libero.it>,
"David S. Miller" <davem@davemloft.net>,
Jonathan Lemon <jonathan.lemon@gmail.com>,
Richard Cochran <richardcochran@gmail.com>,
netdev@vger.kernel.org
Subject: [PATCH] ptp: fix PTP PPS source's lookup cookie set
Date: Thu, 8 Jul 2021 07:08:49 +0200 [thread overview]
Message-ID: <20210708050849.11959-1-dariobin@libero.it> (raw)
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.")
Signed-off-by: Dario Binacchi <dariobin@libero.it>
---
drivers/ptp/ptp_clock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index a23a37a4d5dc..457129c07221 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -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. */
--
2.17.1
next reply other threads:[~2021-07-08 5:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 5:08 Dario Binacchi [this message]
2021-07-08 7:14 ` David Miller
2021-07-08 7:24 ` dariobin
2021-07-08 18:02 ` Jonathan Lemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210708050849.11959-1-dariobin@libero.it \
--to=dariobin@libero.it \
--cc=davem@davemloft.net \
--cc=jonathan.lemon@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®