From 9e3b93c695f7d6235ef023bd30ab23bc52f59344 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Mon, 18 May 2009 17:50:25 +0000 Subject: Add missing breaks so we don't fallthrough into unwanted matching logic. ok oga@ deraadt@ miod@ --- sys/arch/amd64/pci/pcib.c | 5 ++++- sys/arch/i386/pci/pcib.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/amd64/pci/pcib.c b/sys/arch/amd64/pci/pcib.c index 8d1d5fc6d3e..05b28cc5384 100644 --- a/sys/arch/amd64/pci/pcib.c +++ b/sys/arch/amd64/pci/pcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcib.c,v 1.3 2008/06/26 05:42:09 ray Exp $ */ +/* $OpenBSD: pcib.c,v 1.4 2009/05/18 17:50:24 jsg Exp $ */ /* $NetBSD: pcib.c,v 1.6 1997/06/06 23:29:16 thorpej Exp $ */ /*- @@ -72,18 +72,21 @@ pcibmatch(struct device *parent, void *match, void *aux) /* The above bridges mis-identify themselves */ return (1); } + break; case PCI_VENDOR_SIS: switch (PCI_PRODUCT(pa->pa_id)) { case PCI_PRODUCT_SIS_85C503: /* mis-identifies itself as a miscellaneous prehistoric */ return (1); } + break; case PCI_VENDOR_VIATECH: switch (PCI_PRODUCT(pa->pa_id)) { case PCI_PRODUCT_VIATECH_VT82C686A_SMB: /* mis-identifies itself as a ISA bridge */ return (0); } + break; } if (PCI_CLASS(pa->pa_class) == PCI_CLASS_BRIDGE && diff --git a/sys/arch/i386/pci/pcib.c b/sys/arch/i386/pci/pcib.c index c603525bca4..fa30a13b87e 100644 --- a/sys/arch/i386/pci/pcib.c +++ b/sys/arch/i386/pci/pcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcib.c,v 1.21 2008/06/26 05:42:11 ray Exp $ */ +/* $OpenBSD: pcib.c,v 1.22 2009/05/18 17:50:24 jsg Exp $ */ /* $NetBSD: pcib.c,v 1.6 1997/06/06 23:29:16 thorpej Exp $ */ /*- @@ -76,18 +76,21 @@ pcibmatch(struct device *parent, void *match, void *aux) /* The above bridges mis-identify themselves */ return (1); } + break; case PCI_VENDOR_SIS: switch (PCI_PRODUCT(pa->pa_id)) { case PCI_PRODUCT_SIS_85C503: /* mis-identifies itself as a miscellaneous prehistoric */ return (1); } + break; case PCI_VENDOR_VIATECH: switch (PCI_PRODUCT(pa->pa_id)) { case PCI_PRODUCT_VIATECH_VT82C686A_SMB: /* mis-identifies itself as a ISA bridge */ return (0); } + break; } if (PCI_CLASS(pa->pa_class) == PCI_CLASS_BRIDGE && -- cgit v1.2.3