summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/exynos-gsc
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-11-26 03:20:19 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-21 10:24:23 -0200
commit9318ab69c50b82f9f513a20955ebd2cb1f482adc (patch)
tree5a2b558da9e4f9f60fb688e6f7ea4fa55ef44bdf /drivers/media/platform/exynos-gsc
parent2c8cc13f36b0563c62aa18454c8f853c287fdfe9 (diff)
downloadlinux-9318ab69c50b82f9f513a20955ebd2cb1f482adc.tar.bz2
[media] exynos-gsc: Rearrange error messages for valid prints
In case of clk_prepare failure, the function gsc_clk_get also prints "failed to get clock" which is not correct. Hence move the error messages to their respective blocks. While at it, also renamed the labels meaningfully. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/exynos-gsc')
-rw-r--r--drivers/media/platform/exynos-gsc/gsc-core.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index 6d6f65d8c1e5..45bcfa7506db 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -1017,25 +1017,26 @@ static int gsc_clk_get(struct gsc_dev *gsc)
dev_dbg(&gsc->pdev->dev, "gsc_clk_get Called\n");
gsc->clock = clk_get(&gsc->pdev->dev, GSC_CLOCK_GATE_NAME);
- if (IS_ERR(gsc->clock))
- goto err_print;
+ if (IS_ERR(gsc->clock)) {
+ dev_err(&gsc->pdev->dev, "failed to get clock~~~: %s\n",
+ GSC_CLOCK_GATE_NAME);
+ goto err_clk_get;
+ }
ret = clk_prepare(gsc->clock);
if (ret < 0) {
+ dev_err(&gsc->pdev->dev, "clock prepare failed for clock: %s\n",
+ GSC_CLOCK_GATE_NAME);
clk_put(gsc->clock);
gsc->clock = NULL;
- goto err;
+ goto err_clk_prepare;
}
return 0;
-err:
- dev_err(&gsc->pdev->dev, "clock prepare failed for clock: %s\n",
- GSC_CLOCK_GATE_NAME);
+err_clk_prepare:
gsc_clk_put(gsc);
-err_print:
- dev_err(&gsc->pdev->dev, "failed to get clock~~~: %s\n",
- GSC_CLOCK_GATE_NAME);
+err_clk_get:
return -ENXIO;
}