diff options
author | John Baldwin <jhb@FreeBSD.org> | 2018-04-18 18:45:34 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2018-04-18 18:45:34 +0000 |
commit | f36411145eaaf561363c194eb68598de3d9a71af (patch) | |
tree | 53b2923d831613b6262f841ba54f3a3feef24b57 | |
parent | eb33d8ce3e81089ccbe2c327a980f3735d1e8209 (diff) | |
download | src-f36411145eaaf561363c194eb68598de3d9a71af.tar.gz src-f36411145eaaf561363c194eb68598de3d9a71af.zip |
Notes
-rw-r--r-- | sys/x86/x86/msi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/x86/x86/msi.c b/sys/x86/x86/msi.c index 1e6a0ca08c11..0890ab31f947 100644 --- a/sys/x86/x86/msi.c +++ b/sys/x86/x86/msi.c @@ -404,7 +404,7 @@ again: /* Do we need to create some new sources? */ if (cnt < count) { /* If we would exceed the max, give up. */ - if (i + (count - cnt) > FIRST_MSI_INT + NUM_MSI_INTS) { + if (i + (count - cnt) >= FIRST_MSI_INT + NUM_MSI_INTS) { mtx_unlock(&msi_lock); free(mirqs, M_MSI); return (ENXIO); @@ -645,7 +645,7 @@ again: /* Do we need to create a new source? */ if (msi == NULL) { /* If we would exceed the max, give up. */ - if (i + 1 > FIRST_MSI_INT + NUM_MSI_INTS) { + if (i + 1 >= FIRST_MSI_INT + NUM_MSI_INTS) { mtx_unlock(&msi_lock); return (ENXIO); } |