diff options
| author | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2015-06-27 09:01:49 +0000 |
|---|---|---|
| committer | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2015-06-27 09:01:49 +0000 |
| commit | 5d62c861b5d5d47919000c17d7693bdc65f7de76 (patch) | |
| tree | 6b489e2eeb987d5ed570fdf0dabdba7e0e9f9a33 /sys/dev/fe | |
| parent | 7d0de310ff2ea1e97a794ad09c189ed9f407520b (diff) | |
Notes
Diffstat (limited to 'sys/dev/fe')
| -rw-r--r-- | sys/dev/fe/if_fe_cbus.c | 17 |
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 171a390126f3..dc10952e0ecc 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); } |
