Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/pci Fix MSIX allocation in pci_intr_alloc
details: https://anonhg.NetBSD.org/src/rev/9f5320cfd152
branches: trunk
changeset: 995006:9f5320cfd152
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Dec 01 20:38:45 2018 +0000
description:
Fix MSIX allocation in pci_intr_alloc
diffstat:
sys/arch/arm/pci/pci_msi_machdep.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (30 lines):
diff -r 42f5a2cbc870 -r 9f5320cfd152 sys/arch/arm/pci/pci_msi_machdep.c
--- a/sys/arch/arm/pci/pci_msi_machdep.c Sat Dec 01 18:29:19 2018 +0000
+++ b/sys/arch/arm/pci/pci_msi_machdep.c Sat Dec 01 20:38:45 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_msi_machdep.c,v 1.4 2018/11/27 20:08:05 jdolecek Exp $ */
+/* $NetBSD: pci_msi_machdep.c,v 1.5 2018/12/01 20:38:45 skrll Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_msi_machdep.c,v 1.4 2018/11/27 20:08:05 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_msi_machdep.c,v 1.5 2018/12/01 20:38:45 skrll Exp $");
#include <sys/kernel.h>
#include <sys/kmem.h>
@@ -212,9 +212,8 @@
if (msix_count == -1)
msix_count = pci_msix_count(pa->pa_pc, pa->pa_tag);
if (msix_count > 0 && (error = pci_msix_alloc_exact(pa, ihps, msix_count)) == 0) {
- if (counts == NULL)
- return EINVAL;
- counts[PCI_INTR_TYPE_MSIX] = msix_count;
+ if (counts != NULL)
+ counts[PCI_INTR_TYPE_MSIX] = msix_count;
return 0;
}
Home |
Main Index |
Thread Index |
Old Index