Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: rtc-ep93xx: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or
on probe failure, since commit 0998d063100 ("device-core: Ensure drvdata
= NULL when no driver is bound"). Thus, it is not needed to manually
clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jingoo Han and committed by
Linus Torvalds
7b32b631 844b8a68

-2
-2
drivers/rtc/rtc-ep93xx.c
··· 167 167 return 0; 168 168 169 169 exit: 170 - platform_set_drvdata(pdev, NULL); 171 170 pdev->dev.platform_data = NULL; 172 171 return err; 173 172 } ··· 174 175 static int ep93xx_rtc_remove(struct platform_device *pdev) 175 176 { 176 177 sysfs_remove_group(&pdev->dev.kobj, &ep93xx_rtc_sysfs_files); 177 - platform_set_drvdata(pdev, NULL); 178 178 pdev->dev.platform_data = NULL; 179 179 180 180 return 0;