aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cs
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2008-06-03 05:47:28 +0000
committerWarner Losh <imp@FreeBSD.org>2008-06-03 05:47:28 +0000
commitb56700df6500698f8e15c889965f86e4437de346 (patch)
tree3cd79a0af5d036c51a9ecadbfa5604b9bdd5b12c /sys/dev/cs
parente476ebf3d5e32547a37ab4f28c02c94267b3b36d (diff)
Notes
Diffstat (limited to 'sys/dev/cs')
-rw-r--r--sys/dev/cs/if_cs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c
index 7c6ac932ba85..4f1775624ecc 100644
--- a/sys/dev/cs/if_cs.c
+++ b/sys/dev/cs/if_cs.c
@@ -453,23 +453,23 @@ cs_cs89x0_probe(device_t dev)
irq = 2;
break;
default:
- error=EINVAL;
+ error = EINVAL;
+ break;
}
} else {
- if (irq > CS8920_NO_INTS) {
+ if (irq > CS8920_NO_INTS && !(sc->flags & CS_NO_IRQ))
error = EINVAL;
- }
}
}
- if (!error) {
- if (!(sc->flags & CS_NO_IRQ))
- cs_writereg(sc, pp_isaint, irq);
- } else {
+ if (error) {
device_printf(dev, "Unknown or invalid irq\n");
- return (ENXIO);
+ return (error);
}
+ if (!(sc->flags & CS_NO_IRQ))
+ cs_writereg(sc, pp_isaint, irq);
+
/*
* Temporary disabled
*