rk3288: fix the bug, release iomap area when probe vcodec failed causing system failure
authorljf <ljf@rock-chips.com>
Mon, 28 Apr 2014 12:06:28 +0000 (20:06 +0800)
committerljf <ljf@rock-chips.com>
Mon, 28 Apr 2014 12:06:28 +0000 (20:06 +0800)
arch/arm/mach-rockchip/vcodec_service.c

index c550e07be351fa69170c119ad3a611999e674b9a..43a60f295cfbc5fbe9a8eb8a0b0fa4e2aed28206 100755 (executable)
@@ -1424,6 +1424,8 @@ static int vcodec_probe(struct platform_device *pdev)
     INIT_DELAYED_WORK(&pservice->power_off_work, vpu_power_off_work);\r
 \r
     vpu_service_power_on(pservice);\r
+    \r
+    mdelay(1);\r
 \r
     res = platform_get_resource(pdev, IORESOURCE_MEM, 0);\r
 \r
@@ -1579,9 +1581,6 @@ err:
     wake_lock_destroy(&pservice->wake_lock);\r
 \r
     if (res) {\r
-        if (regs) {\r
-            devm_ioremap_release(&pdev->dev, res);\r
-        }\r
         devm_release_mem_region(&pdev->dev, res->start, resource_size(res));\r
     }\r
 \r
@@ -1619,7 +1618,6 @@ static int vcodec_remove(struct platform_device *pdev)
     free_irq(pservice->irq_enc, (void *)&pservice->enc_dev);\r
     free_irq(pservice->irq_dec, (void *)&pservice->dec_dev);\r
     res = platform_get_resource(pdev, IORESOURCE_MEM, 0);\r
-    devm_ioremap_release(&pdev->dev, res);\r
     devm_release_mem_region(&pdev->dev, res->start, resource_size(res));\r
     vpu_put_clk(pservice);\r
     wake_lock_destroy(&pservice->wake_lock);\r