From 4c783a3f70b8b9be12d009881797a752cac70701 Mon Sep 17 00:00:00 2001 From: ljf Date: Mon, 28 Apr 2014 20:06:28 +0800 Subject: [PATCH] rk3288: fix the bug, release iomap area when probe vcodec failed causing system failure --- arch/arm/mach-rockchip/vcodec_service.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-rockchip/vcodec_service.c b/arch/arm/mach-rockchip/vcodec_service.c index c550e07be351..43a60f295cfb 100755 --- a/arch/arm/mach-rockchip/vcodec_service.c +++ b/arch/arm/mach-rockchip/vcodec_service.c @@ -1424,6 +1424,8 @@ static int vcodec_probe(struct platform_device *pdev) INIT_DELAYED_WORK(&pservice->power_off_work, vpu_power_off_work); vpu_service_power_on(pservice); + + mdelay(1); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -1579,9 +1581,6 @@ err: wake_lock_destroy(&pservice->wake_lock); if (res) { - if (regs) { - devm_ioremap_release(&pdev->dev, res); - } devm_release_mem_region(&pdev->dev, res->start, resource_size(res)); } @@ -1619,7 +1618,6 @@ static int vcodec_remove(struct platform_device *pdev) free_irq(pservice->irq_enc, (void *)&pservice->enc_dev); free_irq(pservice->irq_dec, (void *)&pservice->dec_dev); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - devm_ioremap_release(&pdev->dev, res); devm_release_mem_region(&pdev->dev, res->start, resource_size(res)); vpu_put_clk(pservice); wake_lock_destroy(&pservice->wake_lock); -- 2.34.1