mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
rtc: mxc: fix memory leak
Free pdata before exit. Found by cppcheck. [[email protected]: add missing iounmap()] Signed-off-by: Alexander Beregalov <[email protected]> Reviewed-by: WANG Cong <[email protected]> Acked-by: Daniel Mack <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Cc Yoichi Yuasa <[email protected]> Cc: Paul Gortmaker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
27fb7f009b
commit
49908e739e
1 changed files with 5 additions and 2 deletions
|
|
@ -396,8 +396,11 @@ static int __init mxc_rtc_probe(struct platform_device *pdev)
|
|||
pdata->ioaddr = ioremap(res->start, resource_size(res));
|
||||
|
||||
clk = clk_get(&pdev->dev, "ckil");
|
||||
if (IS_ERR(clk))
|
||||
return PTR_ERR(clk);
|
||||
if (IS_ERR(clk)) {
|
||||
iounmap(pdata->ioaddr);
|
||||
ret = PTR_ERR(clk);
|
||||
goto exit_free_pdata;
|
||||
}
|
||||
|
||||
rate = clk_get_rate(clk);
|
||||
clk_put(clk);
|
||||
|
|
|
|||
Loading…
Reference in a new issue