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

rtc: rtc-sh: 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
f50c8bf7 66600bbe

-2
-2
drivers/rtc/rtc-sh.c
··· 770 770 clk_disable(rtc->clk); 771 771 clk_put(rtc->clk); 772 772 773 - platform_set_drvdata(pdev, NULL); 774 - 775 773 kfree(rtc); 776 774 777 775 return 0;