From: Wan ZongShun <mcuos.com@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
rtc-linux <rtc-linux@googlegroups.com>,
Alessandro Zummo <a.zummo@towertech.it>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] rtc/m48t59: redundant condition judgement
Date: Fri, 04 Jun 2010 16:42:52 +0800 [thread overview]
Message-ID: <4C08BC8C.4010206@gmail.com> (raw)
It is safe to deallocate a NULL pointer.
so 'if (m48t59)' is redundant condition judgement,
so I remove it.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
---
drivers/rtc/rtc-m48t59.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c
index be8359f..0b66455 100644
--- a/drivers/rtc/rtc-m48t59.c
+++ b/drivers/rtc/rtc-m48t59.c
@@ -506,7 +506,6 @@ out:
free_irq(m48t59->irq, &pdev->dev);
if (m48t59->ioaddr)
iounmap(m48t59->ioaddr);
- if (m48t59)
kfree(m48t59);
return ret;
}
--
1.6.3.3
reply other threads:[~2010-06-04 8:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4C08BC8C.4010206@gmail.com \
--to=mcuos.com@gmail.com \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox