From 4b45c0facb894a5c5fb327fe791e3ff30819a277 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Fri, 28 Jun 2013 09:53:13 +1000 Subject: [PATCH] rtc: rtc-max8998: 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 Signed-off-by: Andrew Morton --- drivers/rtc/rtc-max8998.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-max8998.c b/drivers/rtc/rtc-max8998.c index 042a8734bd28..aa85ffae33d9 100644 --- a/drivers/rtc/rtc-max8998.c +++ b/drivers/rtc/rtc-max8998.c @@ -274,7 +274,7 @@ static int max8998_rtc_probe(struct platform_device *pdev) if (IS_ERR(info->rtc_dev)) { ret = PTR_ERR(info->rtc_dev); dev_err(&pdev->dev, "Failed to register RTC device: %d\n", ret); - goto out_rtc; + return ret; } if (!max8998->irq_domain) @@ -302,10 +302,6 @@ no_irq: } return 0; - -out_rtc: - platform_set_drvdata(pdev, NULL); - return ret; } static int max8998_rtc_remove(struct platform_device *pdev) -- 2.39.5