summaryrefslogtreecommitdiffstats
path: root/sys/dev/fe
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2015-02-03 18:59:52 +0000
committerimp <imp@FreeBSD.org>2015-02-03 18:59:52 +0000
commit4d58bdef010eda5127470f267a4d721d436887ee (patch)
treec051b41eb654d4c68f7dafbf7555880e771a4ecc /sys/dev/fe
parent4bbf5a53e0ad410f119cb2cb19979a6500a78d0b (diff)
downloadFreeBSD-src-4d58bdef010eda5127470f267a4d721d436887ee.zip
FreeBSD-src-4d58bdef010eda5127470f267a4d721d436887ee.tar.gz
Silence a coverity warning about ignoring a return value. We do, but
we also know that it "can't fail" given the single-threaded nature of device enumeration. Go ahead and check it just in case, but add a comment. CID: 1009393 Sponsored by: Netflix, Inc
Diffstat (limited to 'sys/dev/fe')
-rw-r--r--sys/dev/fe/if_fe_isa.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/dev/fe/if_fe_isa.c b/sys/dev/fe/if_fe_isa.c
index 1770434..53046e9 100644
--- a/sys/dev/fe/if_fe_isa.c
+++ b/sys/dev/fe/if_fe_isa.c
@@ -133,10 +133,21 @@ static int
fe_isa_attach(device_t dev)
{
struct fe_softc *sc = device_get_softc(dev);
+ int error = 0;
- if (sc->port_used)
- fe_alloc_port(dev, sc->port_used);
- fe_alloc_irq(dev, 0);
+ /*
+ * Note: these routines aren't expected to fail since we also call
+ * them in the probe routine. But coverity complains, so we'll honor
+ * that complaint since the intention here was never to ignore them..
+ */
+ if (sc->port_used) {
+ error = fe_alloc_port(dev, sc->port_used);
+ if (error != 0)
+ return (error);
+ }
+ error = fe_alloc_irq(dev, 0);
+ if (error != 0)
+ return (error);
return fe_attach(dev);
}
OpenPOWER on IntegriCloud