[media] exynos4-is: Remove redundant NULL check in fimc-lite.c
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 30 Apr 2013 03:51:33 +0000 (00:51 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 13 Jun 2013 00:41:41 +0000 (21:41 -0300)
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>
drivers/media/platform/exynos4-is/fimc-lite.c

index 2f11ae4..80ebf43 100644 (file)
@@ -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;
 }