From: David Woodhouse Date: Sat, 18 Oct 2008 14:43:14 +0000 (+0100) Subject: dmar: fix uninitialised 'ret' variable in dmar_parse_dev() X-Git-Tag: v2.6.28-rc1~39^2~1^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f82851a8a480a26611175f064f54e17f5f7b01ae;p=karo-tx-linux.git dmar: fix uninitialised 'ret' variable in dmar_parse_dev() This was introduced by commit 1886e8a90a580f3ad343f2065c84c1b9e1dac9ef ("x64, x2apic/intr-remap: code re-structuring, to be used by both DMA and Interrupt remapping"). It was causing bogus results to be returned from dmar_parse_dev() when the first unit with the INCLUDE_ALL flag was processed. Signed-off-by: David Woodhouse --- diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index b65173828bc2..7b3751136e63 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c @@ -188,12 +188,11 @@ dmar_parse_one_drhd(struct acpi_dmar_header *header) return 0; } -static int __init -dmar_parse_dev(struct dmar_drhd_unit *dmaru) +static int __init dmar_parse_dev(struct dmar_drhd_unit *dmaru) { struct acpi_dmar_hardware_unit *drhd; static int include_all; - int ret; + int ret = 0; drhd = (struct acpi_dmar_hardware_unit *) dmaru->hdr;