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 linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html