aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDevendra Naga <devendra.aaru@gmail.com>2012-07-30 17:41:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 20:25:18 -0400
commit007def046711479f3d19bec4016b65fd73deed6c (patch)
tree52815e19a211f80c9476b71404675ce915323817 /drivers
parent19a1ac505d5f3545ebc5b0a195d65cef4da94bb5 (diff)
rtc/rtc-da9052: remove unneed devm_kfree call
Freeing will trigger when driver unloads, so using devm_kfree() is not needed. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Ashish Jangam <ashish.jangam@kpitcummins.com> Cc: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/rtc-da9052.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c
index da6ab5291a41..78070255bd3f 100644
--- a/drivers/rtc/rtc-da9052.c
+++ b/drivers/rtc/rtc-da9052.c
@@ -245,7 +245,7 @@ static int __devinit da9052_rtc_probe(struct platform_device *pdev)
245 "ALM", rtc); 245 "ALM", rtc);
246 if (ret != 0) { 246 if (ret != 0) {
247 rtc_err(rtc->da9052, "irq registration failed: %d\n", ret); 247 rtc_err(rtc->da9052, "irq registration failed: %d\n", ret);
248 goto err_mem; 248 return ret;
249 } 249 }
250 250
251 rtc->rtc = rtc_device_register(pdev->name, &pdev->dev, 251 rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
@@ -259,8 +259,6 @@ static int __devinit da9052_rtc_probe(struct platform_device *pdev)
259 259
260err_free_irq: 260err_free_irq:
261 free_irq(rtc->irq, rtc); 261 free_irq(rtc->irq, rtc);
262err_mem:
263 devm_kfree(&pdev->dev, rtc);
264 return ret; 262 return ret;
265} 263}
266 264
@@ -271,7 +269,6 @@ static int __devexit da9052_rtc_remove(struct platform_device *pdev)
271 rtc_device_unregister(rtc->rtc); 269 rtc_device_unregister(rtc->rtc);
272 free_irq(rtc->irq, rtc); 270 free_irq(rtc->irq, rtc);
273 platform_set_drvdata(pdev, NULL); 271 platform_set_drvdata(pdev, NULL);
274 devm_kfree(&pdev->dev, rtc);
275 272
276 return 0; 273 return 0;
277} 274}