提交 24f99dd0 编写于 作者: S Sachin Kamat 提交者: 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: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 8638a467
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册