Subject: ptp: do not explicitly set drvdata in ptp_clock_register()

From: Dmitry Torokhov <[email-masked]>
Date: Tue, 14 Feb 2017 10:23:31 -0800

commit 882f312dc0751c973db26478f07f082c584d16aa upstream.

We do not need explicitly call dev_set_drvdata(), as it is done for us by
device_create().

Acked-by: Richard Cochran <[email-masked]>
Signed-off-by: Dmitry Torokhov <[email-masked]>
Signed-off-by: David S. Miller <[email-masked]>
Signed-off-by: Ben Hutchings <[email-masked]>
---
 drivers/ptp/ptp_clock.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index 60a5e0c63a13..113b66f1fc9e 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -220,8 +220,6 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
 	if (IS_ERR(ptp->dev))
 		goto no_device;
 
-	dev_set_drvdata(ptp->dev, ptp);
-
 	err = ptp_populate_sysfs(ptp);
 	if (err)
 		goto no_sysfs;