diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2015-11-23 13:55:49 +0100 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:48:53 +0900 |
commit | f0dc90527b5a5b2b0e49789f7546148b94b07908 (patch) | |
tree | 4277869f70ce441e25421735807955c051b8618c /drivers/media | |
parent | 17d64aadedf91d12c53c881f7b2edadd99c71d5c (diff) |
media: fimc-is: fix possible memory leak found by static analysis
This patch fixes all issues pointed by Klocwork static analysis tool.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/exynos/fimc-is/fimc-is-device-csi.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/exynos/fimc-is/setup-fimc-is.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/platform/exynos/fimc-is/fimc-is-device-csi.c b/drivers/media/platform/exynos/fimc-is/fimc-is-device-csi.c index cf712ebbae40..7ef4e5b75d40 100644 --- a/drivers/media/platform/exynos/fimc-is/fimc-is-device-csi.c +++ b/drivers/media/platform/exynos/fimc-is/fimc-is-device-csi.c @@ -363,7 +363,7 @@ int fimc_is_csi_probe(void *parent, u32 instance) csi->phy = devm_phy_get(&device->pdev->dev, "csis"); if (IS_ERR(csi->phy)) { ret = PTR_ERR(csi->phy); - goto p_err_free1; + goto p_err_free2; } csi->instance = instance; diff --git a/drivers/media/platform/exynos/fimc-is/setup-fimc-is.c b/drivers/media/platform/exynos/fimc-is/setup-fimc-is.c index 63d54889fab4..8699f5a64bda 100644 --- a/drivers/media/platform/exynos/fimc-is/setup-fimc-is.c +++ b/drivers/media/platform/exynos/fimc-is/setup-fimc-is.c @@ -43,13 +43,13 @@ int fimc_is_set_parent_dt(struct platform_device *pdev, struct clk *p; struct clk *c; - p = clk_get(&pdev->dev, parent); + p = devm_clk_get(&pdev->dev, parent); if (IS_ERR(p)) { pr_err("%s: could not lookup clock : %s\n", __func__, parent); return -EINVAL; } - c = clk_get(&pdev->dev, child); + c = devm_clk_get(&pdev->dev, child); if (IS_ERR(c)) { pr_err("%s: could not lookup clock : %s\n", __func__, child); return -EINVAL; @@ -64,7 +64,7 @@ int fimc_is_set_rate_dt(struct platform_device *pdev, { struct clk *target; - target = clk_get(&pdev->dev, conid); + target = devm_clk_get(&pdev->dev, conid); if (IS_ERR(target)) { pr_err("%s: could not lookup clock : %s\n", __func__, conid); return -EINVAL; @@ -80,7 +80,7 @@ unsigned int fimc_is_get_rate_dt(struct platform_device *pdev, struct clk *target; unsigned int rate_target; - target = clk_get(&pdev->dev, conid); + target = devm_clk_get(&pdev->dev, conid); if (IS_ERR(target)) { pr_err("%s: could not lookup clock : %s\n", __func__, conid); return -EINVAL; @@ -98,7 +98,7 @@ unsigned int fimc_is_enable_dt(struct platform_device *pdev, { struct clk *target; - target = clk_get(&pdev->dev, conid); + target = devm_clk_get(&pdev->dev, conid); if (IS_ERR(target)) { pr_err("%s: could not lookup clock : %s\n", __func__, conid); return -EINVAL; @@ -115,7 +115,7 @@ void fimc_is_disable_dt(struct platform_device *pdev, { struct clk *target; - target = clk_get(&pdev->dev, conid); + target = devm_clk_get(&pdev->dev, conid); if (IS_ERR(target)) { pr_err("%s: could not lookup clock : %s\n", __func__, conid); } |