Skip to content

Commit

Permalink
dmar: fix uninitialised 'ret' variable in dmar_parse_dev()
Browse files Browse the repository at this point in the history
This was introduced by commit 1886e8a
("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 <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Oct 18, 2008
1 parent bb9e6d6 commit f82851a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/pci/dmar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f82851a

Please sign in to comment.