[patch 2/2] ACPI, extlog: remove unneeded NULL check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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);
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux