From: vwadekar@nvidia.com (Varun Wadekar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mtd: s3c2410 nand: Remove uncessary null check
Date: Thu, 21 Jul 2011 12:24:12 +0530 [thread overview]
Message-ID: <4E27CD14.4090702@nvidia.com> (raw)
In-Reply-To: <1311230038-6111-1-git-send-email-jhbird.choi@samsung.com>
On Thursday 21 July 2011 12:03 PM, jhbird.choi at samsung.com wrote:
> From: Jonghwan Choi <jhbird.choi@samsung.com>
>
> clk_get() return a pointer to the struct clk or an ERR_PTR().
>
> Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
> ---
> drivers/mtd/nand/s3c2410.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
> index 4405468..18ff2f5 100644
> --- a/drivers/mtd/nand/s3c2410.c
> +++ b/drivers/mtd/nand/s3c2410.c
> @@ -723,7 +723,7 @@ static int s3c24xx_nand_remove(struct platform_device *pdev)
>
> /* free the common resources */
>
> - if (info->clk != NULL && !IS_ERR(info->clk)) {
> + if (!IS_ERR(info->clk)) {
I think you should use IS_ERR_OR_NULL instead.
> s3c2410_nand_clk_set_state(info, CLOCK_DISABLE);
> clk_put(info->clk);
> }
next prev parent reply other threads:[~2011-07-21 6:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-21 6:33 [PATCH] mtd: s3c2410 nand: Remove uncessary null check jhbird.choi at samsung.com
2011-07-21 6:54 ` Varun Wadekar [this message]
2011-07-21 17:10 ` Russell King - ARM Linux
2011-07-22 8:27 ` Artem Bityutskiy
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=4E27CD14.4090702@nvidia.com \
--to=vwadekar@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).