summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2009-09-19 08:13:10 +0000
committerAndriy Gapon <avg@FreeBSD.org>2009-09-19 08:13:10 +0000
commit1a7268649b0c4e67c3780c9c9aa1305744e7d9b8 (patch)
tree6203fdb5c85838356f17d98fd188cece2bb3655b /sys/dev/pci
parent3f12b2cdd4f5e2f19589e8b3ace5a0d272c846ae (diff)
Notes
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci_user.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c
index ed753539f6df..8ab0a01eb8e7 100644
--- a/sys/dev/pci/pci_user.c
+++ b/sys/dev/pci/pci_user.c
@@ -605,9 +605,8 @@ getconfexit:
case 4:
case 2:
case 1:
- /* Make sure register is in bounds and aligned. */
+ /* Make sure register is not negative and aligned. */
if (io->pi_reg < 0 ||
- io->pi_reg + io->pi_width > PCI_REGMAX + 1 ||
io->pi_reg & (io->pi_width - 1)) {
error = EINVAL;
break;