From: Dmitry Torokhov Date: Tue, 14 Feb 2017 18:23:31 +0000 (-0800) Subject: ptp: do not explicitly set drvdata in ptp_clock_register() X-Git-Tag: v4.9.224~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bca173248fed7477fa607afe0c2efde61f00dbd2;p=thirdparty%2Fkernel%2Fstable.git ptp: do not explicitly set drvdata in ptp_clock_register() 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 Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin --- diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c index 2aa5b37cc6d24..08f304b83ad13 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;