summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-03-27 15:10:45 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-03-27 15:10:45 +0000
commit29e49e6bd1e4a23aaafdd0c6b3be19c2764667dd (patch)
tree4ba0ce23026700b6dcc87a815900be93b27f9267 /sys/dev/pci
parentf416585e5b20babf43ce6a4a4d2fe87d98736963 (diff)
make sure error is set to zero on the pci write case for user conf
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 31ab04831bd..a12bbde504d 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci.c,v 1.27 2002/03/14 01:26:59 millert Exp $ */
+/* $OpenBSD: pci.c,v 1.28 2002/03/27 15:10:44 jason Exp $ */
/* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */
/*
@@ -474,9 +474,10 @@ pciioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
switch(io->pi_width) {
case 4:
/* Make sure the register is properly aligned */
- if (io->pi_reg & 0x3)
+ if (io->pi_reg & 0x3)
return EINVAL;
pci_conf_write(pc, tag, io->pi_reg, io->pi_data);
+ error = 0;
break;
default:
error = ENODEV;