linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2/2] ACPI, extlog: remove unneeded NULL check
@ 2013-11-05 20:20 Dan Carpenter
  2013-11-06 22:06 ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2013-11-05 20:20 UTC (permalink / raw)
  To: Len Brown, Chen, Gong; +Cc: Rafael J. Wysocki, linux-acpi, kernel-janitors

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);

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-11-11  2:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-05 20:20 [patch 2/2] ACPI, extlog: remove unneeded NULL check Dan Carpenter
2013-11-06 22:06 ` 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

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).