mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
msm: kgsl: Cleanup kgsl_iommu_probe properly on error
Make sure all error paths clean up properly. Change-Id: Idbf8b9b33f576b2b22f0120413f290d1ff4e0cef Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
This commit is contained in:
parent
8a6b39ffdb
commit
9a2d8025e3
1 changed files with 8 additions and 0 deletions
|
|
@ -2379,6 +2379,8 @@ int kgsl_iommu_probe(struct kgsl_device *device)
|
|||
struct device_node *node;
|
||||
|
||||
node = of_find_compatible_node(NULL, NULL, "qcom,kgsl-smmu-v2");
|
||||
if (!node)
|
||||
return -ENODEV;
|
||||
|
||||
/* Create a kmem cache for the pagetable address objects */
|
||||
if (!addr_entry_cache) {
|
||||
|
|
@ -2410,6 +2412,12 @@ int kgsl_iommu_probe(struct kgsl_device *device)
|
|||
|
||||
iommu->clks = devm_kcalloc(&pdev->dev, ARRAY_SIZE(kgsl_iommu_clocks),
|
||||
sizeof(struct clk **), GFP_KERNEL);
|
||||
if (!iommu->clks) {
|
||||
platform_device_put(pdev);
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
/* Get the clock from the KGSL device */
|
||||
for (i = 0; i < ARRAY_SIZE(kgsl_iommu_clocks); i++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue