Skip to content

Commit

Permalink
rtc/rtc-da9052: remove unneed devm_kfree call
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Devendra Naga authored and Linus Torvalds committed Jul 31, 2012
1 parent 19a1ac5 commit 007def0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/rtc/rtc-da9052.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static int __devinit da9052_rtc_probe(struct platform_device *pdev)
"ALM", rtc);
if (ret != 0) {
rtc_err(rtc->da9052, "irq registration failed: %d\n", ret);
goto err_mem;
return ret;
}

rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
Expand All @@ -259,8 +259,6 @@ static int __devinit da9052_rtc_probe(struct platform_device *pdev)

err_free_irq:
free_irq(rtc->irq, rtc);
err_mem:
devm_kfree(&pdev->dev, rtc);
return ret;
}

Expand All @@ -271,7 +269,6 @@ static int __devexit da9052_rtc_remove(struct platform_device *pdev)
rtc_device_unregister(rtc->rtc);
free_irq(rtc->irq, rtc);
platform_set_drvdata(pdev, NULL);
devm_kfree(&pdev->dev, rtc);

return 0;
}
Expand Down

0 comments on commit 007def0

Please sign in to comment.