From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-media@vger.kernel.org, s.nawrocki@samsung.com, patches@linaro.org
Subject: Re: [PATCH 1/1] [media] exynos4-is: Remove redundant NULL check in fimc-lite.c
Date: Wed, 01 May 2013 11:29:00 +0200 [thread overview]
Message-ID: <5180E05C.7020206@gmail.com> (raw)
In-Reply-To: <1367297493-31782-1-git-send-email-sachin.kamat@linaro.org>
Sachin,
On 04/30/2013 06:51 AM, Sachin Kamat wrote:
> clk_unprepare checks for NULL pointer. Hence convert IS_ERR_OR_NULL
> to IS_ERR only.
>
> Signed-off-by: Sachin Kamat<sachin.kamat@linaro.org>
> ---
> drivers/media/platform/exynos4-is/fimc-lite.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index 661d0d1..2a0ef82 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -1416,7 +1416,7 @@ 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);
I've queued this patch for 3.11 with the below chunk squashed to it:
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c
b/drivers/media/platform/exynos4-is/fimc-lite.c
index 2ede148..faf2a75 100644
--- a/drivers/media/platform/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/exynos4-is/fimc-lite.c
@@ -1422,7 +1422,7 @@ static void fimc_lite_clk_put(struct fimc_lite *fimc)
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;
}
Thanks.
Sylwester
next prev parent reply other threads:[~2013-05-01 9:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 4:51 [PATCH 1/1] [media] exynos4-is: Remove redundant NULL check in fimc-lite.c Sachin Kamat
2013-05-01 9:29 ` Sylwester Nawrocki [this message]
2013-05-02 4:19 ` Sachin Kamat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5180E05C.7020206@gmail.com \
--to=sylvester.nawrocki@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=patches@linaro.org \
--cc=s.nawrocki@samsung.com \
--cc=sachin.kamat@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox