From: Dan Carpenter <dan.carpenter@oracle.com>
To: Len Brown <lenb@kernel.org>,
Chen@elgon.mountain, Gong <gong.chen@linux.intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-acpi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch 2/2] ACPI, extlog: remove unneeded NULL check
Date: Tue, 5 Nov 2013 23:20:07 +0300 [thread overview]
Message-ID: <20131105202007.GB3949@elgon.mountain> (raw)
We dereference extlog_l1_addr so the check is too late. The
"extlog_l1_addr" pointer can never be NULL when this function is called
so I have removed the check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index c4d5e59..d59e4bb 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -308,8 +308,7 @@ static void __exit extlog_exit(void)
{
mce_unregister_decode_chain(&extlog_mce_dec);
((struct extlog_l1_head *)extlog_l1_addr)->flags &= ~FLAG_OS_OPTIN;
- if (extlog_l1_addr)
- acpi_os_unmap_memory(extlog_l1_addr, l1_size);
+ acpi_os_unmap_memory(extlog_l1_addr, l1_size);
if (elog_addr)
acpi_os_unmap_memory(elog_addr, elog_size);
release_mem_region(elog_base, elog_size);
next reply other threads:[~2013-11-05 20:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 20:20 Dan Carpenter [this message]
2013-11-06 22:06 ` [patch 2/2] ACPI, extlog: remove unneeded NULL check Rafael J. Wysocki
2013-11-06 22:45 ` Tony Luck
2013-11-07 0:09 ` Rafael J. Wysocki
2013-11-07 7:22 ` Chen, Gong
2013-11-08 8:24 ` [patch 2/2 v2] " Dan Carpenter
2013-11-11 2:04 ` Chen, Gong
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=20131105202007.GB3949@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=Chen@elgon.mountain \
--cc=gong.chen@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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