mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
ASoC: tegra-alt: Fix coverity issues in dmic
Coverity id : 28230 Bug 1416640 Change-Id: Ie0a5b28541c9c750ac6d45e8fe2f088757bcbe3f Signed-off-by: Rahul Mittal <rmittal@nvidia.com> Reviewed-on: http://git-master/r/658389 Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam <snikam@nvidia.com>
This commit is contained in:
committed by
Sameer Pujar
parent
8f8c3d0aa9
commit
11a52e63fe
@@ -361,14 +361,12 @@ static int tegra210_dmic_platform_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
dmic->soc_data = soc_data;
|
dmic->soc_data = soc_data;
|
||||||
|
|
||||||
#ifndef CONFIG_MACH_GRENADA
|
|
||||||
dmic->clk_dmic = devm_clk_get(&pdev->dev, NULL);
|
dmic->clk_dmic = devm_clk_get(&pdev->dev, NULL);
|
||||||
if (IS_ERR(dmic->clk_dmic)) {
|
if (IS_ERR(dmic->clk_dmic)) {
|
||||||
dev_err(&pdev->dev, "Can't retrieve dmic clock\n");
|
dev_err(&pdev->dev, "Can't retrieve dmic clock\n");
|
||||||
ret = PTR_ERR(dmic->clk_dmic);
|
ret = PTR_ERR(dmic->clk_dmic);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
if (!mem) {
|
if (!mem) {
|
||||||
@@ -433,9 +431,7 @@ err_suspend:
|
|||||||
err_pm_disable:
|
err_pm_disable:
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
err_clk_put:
|
err_clk_put:
|
||||||
#ifndef CONFIG_MACH_GRENADA
|
|
||||||
devm_clk_put(&pdev->dev, dmic->clk_dmic);
|
devm_clk_put(&pdev->dev, dmic->clk_dmic);
|
||||||
#endif
|
|
||||||
err:
|
err:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -451,9 +447,7 @@ static int tegra210_dmic_platform_remove(struct platform_device *pdev)
|
|||||||
if (!pm_runtime_status_suspended(&pdev->dev))
|
if (!pm_runtime_status_suspended(&pdev->dev))
|
||||||
tegra210_dmic_runtime_suspend(&pdev->dev);
|
tegra210_dmic_runtime_suspend(&pdev->dev);
|
||||||
|
|
||||||
#ifndef CONFIG_MACH_GRENADA
|
|
||||||
devm_clk_put(&pdev->dev, dmic->clk_dmic);
|
devm_clk_put(&pdev->dev, dmic->clk_dmic);
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user