Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269202AbUICVTE (ORCPT ); Fri, 3 Sep 2004 17:19:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269801AbUICVTE (ORCPT ); Fri, 3 Sep 2004 17:19:04 -0400 Received: from delerium.kernelslacker.org ([81.187.208.145]:36020 "EHLO delerium.codemonkey.org.uk") by vger.kernel.org with ESMTP id S269202AbUICVNj (ORCPT ); Fri, 3 Sep 2004 17:13:39 -0400 Date: Fri, 3 Sep 2004 22:13:11 +0100 From: Dave Jones To: len.brown@intel.com Cc: Linux Kernel Subject: Pointer dereference before NULL check in ACPI thermal driver. Message-ID: <20040903211311.GX26419@redhat.com> Mail-Followup-To: Dave Jones , len.brown@intel.com, Linux Kernel Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 877 Lines: 29 Again, found with coverity's checker. Signed-off-by: Dave Jones --- linux-2.6.8/drivers/acpi/thermal.c~ 2004-09-03 22:11:22.630428496 +0100 +++ linux-2.6.8/drivers/acpi/thermal.c 2004-09-03 22:11:44.392120216 +0100 @@ -659,7 +659,7 @@ struct acpi_thermal *tz = (struct acpi_thermal *) data; unsigned long sleep_time = 0; int i = 0; - struct acpi_thermal_state state = tz->state; + struct acpi_thermal_state state; ACPI_FUNCTION_TRACE("acpi_thermal_check"); @@ -668,6 +668,8 @@ return_VOID; } + state = tz->state; + result = acpi_thermal_get_temperature(tz); if (result) return_VOID; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/