Since this function just returns (since gsc->clock is NULL), remove it and make the exit code simpler. Cc: Shaik Ameer Basha <shaik.ameer@xxxxxxxxxxx> Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx> --- drivers/media/platform/exynos-gsc/gsc-core.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 45bcfa7..99ee1a9 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1020,7 +1020,7 @@ static int gsc_clk_get(struct gsc_dev *gsc) if (IS_ERR(gsc->clock)) { dev_err(&gsc->pdev->dev, "failed to get clock~~~: %s\n", GSC_CLOCK_GATE_NAME); - goto err_clk_get; + goto err; } ret = clk_prepare(gsc->clock); @@ -1029,14 +1029,12 @@ static int gsc_clk_get(struct gsc_dev *gsc) GSC_CLOCK_GATE_NAME); clk_put(gsc->clock); gsc->clock = NULL; - goto err_clk_prepare; + goto err; } return 0; -err_clk_prepare: - gsc_clk_put(gsc); -err_clk_get: +err: return -ENXIO; } -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html