From: Devendra Naga Date: Mon, 30 Jul 2012 21:41:54 +0000 (-0700) Subject: rtc/rtc-da9052: remove unneed devm_kfree call X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=007def046711479f3d19bec4016b65fd73deed6c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Cc: Alessandro Zummo Cc: Ashish Jangam Cc: David Dajun Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) "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; }