mirror of
https://github.com/opnsense/src.git
synced 2026-04-25 08:07:28 -04:00
If either ed_probe_Novell or ed_attach returns an error, release the
resources too.
This commit is contained in:
parent
7e22e3674b
commit
b3f44d7907
1 changed files with 5 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue