diff options
author | Elaine Zhang <zhangqing@rock-chips.com> | 2016-02-27 04:19:23 +0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@rock-chips.com> | 2016-02-29 20:49:13 +0800 |
commit | c2bdb4abe861b4406214f62bd406d88b16bd862b (patch) | |
tree | cf2b068ffe565b62ed19cd8076d03e1c8a942798 /drivers/rtc | |
parent | 6014197ab14da9d1abd7b5911415c1dcb345169f (diff) |
rockchip: power & pmic: fix compile warning
fixed the WARNING: invalid free of devm_ allocated data
Change-Id: I54514cf53a8a0d1f885fd0a17e7f6db7af1d10f9
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Diffstat (limited to 'drivers/rtc')
-rwxr-xr-x | drivers/rtc/rtc-ricoh619.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/rtc/rtc-ricoh619.c b/drivers/rtc/rtc-ricoh619.c index 9b16f28f2835..603fa1303b0e 100755 --- a/drivers/rtc/rtc-ricoh619.c +++ b/drivers/rtc/rtc-ricoh619.c @@ -750,7 +750,7 @@ static int ricoh619_rtc_probe(struct platform_device *pdev) device_init_wakeup(&pdev->dev, 1); // printk(KERN_INFO "PMU: %s register rtc device \n", __func__); - rtc->rtc = rtc_device_register(pdev->name, &pdev->dev, + rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, &ricoh619_rtc_ops, THIS_MODULE); // set interrupt and enable it @@ -800,18 +800,11 @@ static int ricoh619_rtc_probe(struct platform_device *pdev) return 0; fail: - if (!IS_ERR_OR_NULL(rtc->rtc)) - rtc_device_unregister(rtc->rtc); - kfree(rtc); return err; } static int ricoh619_rtc_remove(struct platform_device *pdev) { - struct ricoh619_rtc *rtc = dev_get_drvdata(&pdev->dev); - - rtc_device_unregister(rtc->rtc); - kfree(rtc); return 0; } |