summaryrefslogtreecommitdiffstats
path: root/sys/dev/fe/if_fe_cbus.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-07-04 21:50:39 +0000
committerdim <dim@FreeBSD.org>2015-07-04 21:50:39 +0000
commit6f44bd3256388beb23fd03fdf43ad5d53cf43e29 (patch)
tree37590f5c697f4198fdddec33c58aefdef0a5f485 /sys/dev/fe/if_fe_cbus.c
parentcea4c167517a0678c7dbf92a0324088dcbac1035 (diff)
parent76b8ff88e56f9ad0639b7e23dd9d1128a0750026 (diff)
downloadFreeBSD-src-6f44bd3256388beb23fd03fdf43ad5d53cf43e29.zip
FreeBSD-src-6f44bd3256388beb23fd03fdf43ad5d53cf43e29.tar.gz
Merge ^/head r284737 through r285152.
Diffstat (limited to 'sys/dev/fe/if_fe_cbus.c')
-rw-r--r--sys/dev/fe/if_fe_cbus.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/dev/fe/if_fe_cbus.c b/sys/dev/fe/if_fe_cbus.c
index 171a390..dc10952 100644
--- a/sys/dev/fe/if_fe_cbus.c
+++ b/sys/dev/fe/if_fe_cbus.c
@@ -157,10 +157,21 @@ static int
fe_isa_attach(device_t dev)
{
struct fe_softc *sc = device_get_softc(dev);
+ int error = 0;
- if (sc->port_used)
- fe98_alloc_port(dev, sc->type);
- 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 = fe98_alloc_port(dev, sc->type);
+ if (error != 0)
+ return (error);
+ }
+ error = fe_alloc_irq(dev, 0);
+ if (error != 0)
+ return (error);
return fe_attach(dev);
}
OpenPOWER on IntegriCloud