[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: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Sachin Kamat 2013-04-30 00:51:33 -03:00 коммит произвёл Mauro Carvalho Chehab
Родитель 8638a467cc
Коммит 24f99dd0fb
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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)
{
if (IS_ERR_OR_NULL(fimc->clock))
if (IS_ERR(fimc->clock))
return;
clk_unprepare(fimc->clock);
clk_put(fimc->clock);
fimc->clock = NULL;
fimc->clock = ERR_PTR(-EINVAL);
}
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);
if (ret < 0) {
clk_put(fimc->clock);
fimc->clock = NULL;
fimc->clock = ERR_PTR(-EINVAL);
}
return ret;
}