Commit 24f99dd0 authored by Sachin Kamat's avatar Sachin Kamat Committed by Mauro Carvalho Chehab

[media] exynos4-is: Remove redundant NULL check in fimc-lite.c

clk_unprepare checks for NULL pointer. Hence convert IS_ERR_OR_NULL
to IS_ERR only.
[s.nawrocki: replaced initialisations to NULL with ERR_PTR() value]
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8638a467
...@@ -1417,12 +1417,12 @@ static void fimc_lite_unregister_capture_subdev(struct fimc_lite *fimc) ...@@ -1417,12 +1417,12 @@ static void fimc_lite_unregister_capture_subdev(struct fimc_lite *fimc)
static void fimc_lite_clk_put(struct fimc_lite *fimc) static void fimc_lite_clk_put(struct fimc_lite *fimc)
{ {
if (IS_ERR_OR_NULL(fimc->clock)) if (IS_ERR(fimc->clock))
return; return;
clk_unprepare(fimc->clock); clk_unprepare(fimc->clock);
clk_put(fimc->clock); clk_put(fimc->clock);
fimc->clock = NULL; fimc->clock = ERR_PTR(-EINVAL);
} }
static int fimc_lite_clk_get(struct fimc_lite *fimc) static int fimc_lite_clk_get(struct fimc_lite *fimc)
...@@ -1436,7 +1436,7 @@ static int fimc_lite_clk_get(struct fimc_lite *fimc) ...@@ -1436,7 +1436,7 @@ static int fimc_lite_clk_get(struct fimc_lite *fimc)
ret = clk_prepare(fimc->clock); ret = clk_prepare(fimc->clock);
if (ret < 0) { if (ret < 0) {
clk_put(fimc->clock); clk_put(fimc->clock);
fimc->clock = NULL; fimc->clock = ERR_PTR(-EINVAL);
} }
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment