提交 007def04 编写于 作者: D Devendra Naga 提交者: Linus Torvalds

rtc/rtc-da9052: remove unneed devm_kfree call

Freeing will trigger when driver unloads, so using devm_kfree() is not
needed.
Signed-off-by: NDevendra 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 19a1ac50
...@@ -245,7 +245,7 @@ static int __devinit da9052_rtc_probe(struct platform_device *pdev) ...@@ -245,7 +245,7 @@ static int __devinit da9052_rtc_probe(struct platform_device *pdev)
"ALM", rtc); "ALM", rtc);
if (ret != 0) { if (ret != 0) {
rtc_err(rtc->da9052, "irq registration failed: %d\n", ret); rtc_err(rtc->da9052, "irq registration failed: %d\n", ret);
goto err_mem; return ret;
} }
rtc->rtc = rtc_device_register(pdev->name, &pdev->dev, rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
...@@ -259,8 +259,6 @@ static int __devinit da9052_rtc_probe(struct platform_device *pdev) ...@@ -259,8 +259,6 @@ static int __devinit da9052_rtc_probe(struct platform_device *pdev)
err_free_irq: err_free_irq:
free_irq(rtc->irq, rtc); free_irq(rtc->irq, rtc);
err_mem:
devm_kfree(&pdev->dev, rtc);
return ret; return ret;
} }
...@@ -271,7 +269,6 @@ static int __devexit da9052_rtc_remove(struct platform_device *pdev) ...@@ -271,7 +269,6 @@ static int __devexit da9052_rtc_remove(struct platform_device *pdev)
rtc_device_unregister(rtc->rtc); rtc_device_unregister(rtc->rtc);
free_irq(rtc->irq, rtc); free_irq(rtc->irq, rtc);
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
devm_kfree(&pdev->dev, rtc);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册