diff options
author | imp <imp@FreeBSD.org> | 2005-02-09 17:35:13 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-02-09 17:35:13 +0000 |
commit | ecbdad392c9834599fff9cd2683900672354f4c0 (patch) | |
tree | f113de63f064808a261c3fbe6596cd6b87646e34 /sys | |
parent | 60578220b43bee6c452132382acfbb6c8f78d90c (diff) | |
download | FreeBSD-src-ecbdad392c9834599fff9cd2683900672354f4c0.zip FreeBSD-src-ecbdad392c9834599fff9cd2683900672354f4c0.tar.gz |
If either ed_probe_Novell or ed_attach returns an error, release the
resources too.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ed/if_ed_pci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/ed/if_ed_pci.c b/sys/dev/ed/if_ed_pci.c index 71fe499..c47bb95 100644 --- a/sys/dev/ed/if_ed_pci.c +++ b/sys/dev/ed/if_ed_pci.c @@ -84,8 +84,10 @@ ed_pci_attach(device_t dev) int error; error = ed_probe_Novell(dev, PCIR_BAR(0), flags); - if (error) + if (error) { + ed_release_resources(dev); return (error); + } error = ed_alloc_irq(dev, 0, RF_SHAREABLE); if (error) { @@ -101,7 +103,8 @@ ed_pci_attach(device_t dev) } error = ed_attach(dev); - + if (error) + ed_release_resources(dev); return (error); } |