lkml.org 
[lkml]   [2013]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH -next] ASoC: mid-x86: add missing iounmap() to probe error and remove
From
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Add the missing iounmap() before return from snd_mfld_mc_probe()
in the error handling case and to snd_mfld_mc_remove().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
sound/soc/mid-x86/mfld_machine.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/mid-x86/mfld_machine.c b/sound/soc/mid-x86/mfld_machine.c
index 78d5825..8206e84 100644
--- a/sound/soc/mid-x86/mfld_machine.c
+++ b/sound/soc/mid-x86/mfld_machine.c
@@ -397,7 +397,7 @@ static int snd_mfld_mc_probe(struct platform_device *pdev)
IRQF_SHARED, pdev->dev.driver->name, mc_drv_ctx);
if (ret_val) {
pr_err("cannot register IRQ\n");
- goto unalloc;
+ goto unmap;
}
/* register the soc card */
snd_soc_card_mfld.dev = &pdev->dev;
@@ -412,6 +412,8 @@ static int snd_mfld_mc_probe(struct platform_device *pdev)

freeirq:
free_irq(irq, mc_drv_ctx);
+unmap:
+ iounmap(mc_drv_ctx->int_base);
unalloc:
kfree(mc_drv_ctx);
return ret_val;
@@ -424,6 +426,7 @@ static int snd_mfld_mc_remove(struct platform_device *pdev)
pr_debug("snd_mfld_mc_remove called\n");
free_irq(platform_get_irq(pdev, 0), mc_drv_ctx);
snd_soc_unregister_card(&snd_soc_card_mfld);
+ iounmap(mc_drv_ctx->int_base);
kfree(mc_drv_ctx);
return 0;
}


\
 
 \ /
  Last update: 2013-05-13 11:41    [W:0.539 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site