Module Name: src
Committed By: riastradh
Date: Mon Jul 20 21:29:38 UTC 2020
Modified Files:
src/sys/external/bsd/drm2/via: via_pci.c
Log Message:
viadrmums: Stop gracefully at the end of the PCI id list.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/via/via_pci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/via/via_pci.c
diff -u src/sys/external/bsd/drm2/via/via_pci.c:1.3 src/sys/external/bsd/drm2/via/via_pci.c:1.4
--- src/sys/external/bsd/drm2/via/via_pci.c:1.3 Mon Aug 27 14:12:44 2018
+++ src/sys/external/bsd/drm2/via/via_pci.c Mon Jul 20 21:29:38 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: via_pci.c,v 1.3 2018/08/27 14:12:44 riastradh Exp $ */
+/* $NetBSD: via_pci.c,v 1.4 2020/07/20 21:29:38 riastradh Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: via_pci.c,v 1.3 2018/08/27 14:12:44 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: via_pci.c,v 1.4 2020/07/20 21:29:38 riastradh Exp $");
#include <sys/types.h>
#include <sys/device.h>
@@ -70,6 +70,9 @@ viadrm_lookup(const struct pci_attach_ar
unsigned i;
for (i = 0; i < __arraycount(viadrm_pci_ids); i++) {
+ if (viadrm_pci_ids[i].vendor == 0 &&
+ viadrm_pci_ids[i].device == 0)
+ break;
KASSERT(viadrm_pci_ids[i].subvendor == PCI_ANY_ID);
KASSERT(viadrm_pci_ids[i].subdevice == PCI_ANY_ID);
KASSERT(viadrm_pci_ids[i].class == 0);