From: Sachin Kamat Date: Tue, 30 Apr 2013 03:51:33 +0000 (-0300) Subject: [media] exynos4-is: Remove redundant NULL check in fimc-lite.c X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=24f99dd0fb546b0933564f9697aa5fa5fe9b41da;p=linux-beck.git [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 Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index 2f11ae4fd4a4..80ebf439e352 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -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; }