From: Simon Baatz <gmbnomis@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Jason Cooper <jason@lakedaemon.net>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
cjb@laptop.org, linux-mmc@vger.kernel.org,
linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] mmc: mvsdio: Replace IS_ERR_NULL() is with IS_ERR()
Date: Fri, 11 Jan 2013 01:43:24 +0100 [thread overview]
Message-ID: <20130111004323.GA12257@schnuecks.de> (raw)
In-Reply-To: <1357849755-8168-1-git-send-email-andrew@lunn.ch>
Hi Andrew,
On Thu, Jan 10, 2013 at 09:29:15PM +0100, Andrew Lunn wrote:
> A NULL is a valid clk cookie, so we should not be tested with
> IS_ERR_NULL(). Replace it with IS_ERR().
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> drivers/mmc/host/mvsdio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
> index de4c20b..d0050fa 100644
> --- a/drivers/mmc/host/mvsdio.c
> +++ b/drivers/mmc/host/mvsdio.c
> @@ -839,7 +839,7 @@ out:
> if (r)
> release_resource(r);
> if (mmc)
> - if (!IS_ERR_OR_NULL(host->clk)) {
> + if (!IS_ERR(host->clk)) {
> clk_disable_unprepare(host->clk);
> clk_put(host->clk);
> }
Hmm. I think this check was originally intended to go under "if
(host)" above and not here. Notice the indentation mismatch/missing
braces for "if (mmc)". My bad.
Additionally, host->clk == NULL is not necessarily the result of
clk_get() but it can also be NULL if the irq could not be assigned.
Leading to unbalanced clk calls in this case.
- Simon
WARNING: multiple messages have this Message-ID (diff)
From: gmbnomis@gmail.com (Simon Baatz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: mvsdio: Replace IS_ERR_NULL() is with IS_ERR()
Date: Fri, 11 Jan 2013 01:43:24 +0100 [thread overview]
Message-ID: <20130111004323.GA12257@schnuecks.de> (raw)
In-Reply-To: <1357849755-8168-1-git-send-email-andrew@lunn.ch>
Hi Andrew,
On Thu, Jan 10, 2013 at 09:29:15PM +0100, Andrew Lunn wrote:
> A NULL is a valid clk cookie, so we should not be tested with
> IS_ERR_NULL(). Replace it with IS_ERR().
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> drivers/mmc/host/mvsdio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
> index de4c20b..d0050fa 100644
> --- a/drivers/mmc/host/mvsdio.c
> +++ b/drivers/mmc/host/mvsdio.c
> @@ -839,7 +839,7 @@ out:
> if (r)
> release_resource(r);
> if (mmc)
> - if (!IS_ERR_OR_NULL(host->clk)) {
> + if (!IS_ERR(host->clk)) {
> clk_disable_unprepare(host->clk);
> clk_put(host->clk);
> }
Hmm. I think this check was originally intended to go under "if
(host)" above and not here. Notice the indentation mismatch/missing
braces for "if (mmc)". My bad.
Additionally, host->clk == NULL is not necessarily the result of
clk_get() but it can also be NULL if the irq could not be assigned.
Leading to unbalanced clk calls in this case.
- Simon
next prev parent reply other threads:[~2013-01-11 0:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-10 20:29 [PATCH] mmc: mvsdio: Replace IS_ERR_NULL() is with IS_ERR() Andrew Lunn
2013-01-10 20:29 ` Andrew Lunn
2013-01-10 20:49 ` Jason Cooper
2013-01-10 20:49 ` Jason Cooper
2013-01-11 0:43 ` Simon Baatz [this message]
2013-01-11 0:43 ` Simon Baatz
2013-01-11 7:27 ` [PATCH v2] mmc: mvsdio: Replace IS_ERR_OR_NULL() " Andrew Lunn
2013-01-11 7:27 ` Andrew Lunn
2013-01-13 20:43 ` Jason Cooper
2013-01-13 20:43 ` Jason Cooper
2013-01-13 21:42 ` Andrew Lunn
2013-01-13 21:42 ` Andrew Lunn
2013-01-11 11:02 ` [PATCH] mmc: mvsdio: Replace IS_ERR_NULL() is " Russell King - ARM Linux
2013-01-11 11:02 ` Russell King - ARM Linux
2013-01-11 11:09 ` Thomas Petazzoni
2013-01-11 11:09 ` Thomas Petazzoni
2013-01-11 11:11 ` Russell King - ARM Linux
2013-01-11 11:11 ` Russell King - ARM Linux
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=20130111004323.GA12257@schnuecks.de \
--to=gmbnomis@gmail.com \
--cc=andrew@lunn.ch \
--cc=cjb@laptop.org \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.