]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc/rtc-da9052: remove unneed devm_kfree call
authorDevendra Naga <devendra.aaru@gmail.com>
Sat, 21 Jul 2012 00:55:06 +0000 (10:55 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Jul 2012 03:53:25 +0000 (13:53 +1000)
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>
drivers/rtc/rtc-da9052.c

index da6ab5291a414c70b8ed29b57243f8a9192d14c3..78070255bd3f834d7aa8efa937e5ca552c07f4d1 100644 (file)
@@ -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,
@@ -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;
 }
 
@@ -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;
 }