diff --git a/sys/dev/wi/if_wi_pci.c b/sys/dev/wi/if_wi_pci.c index 4f15d472956..72b37f22906 100644 --- a/sys/dev/wi/if_wi_pci.c +++ b/sys/dev/wi/if_wi_pci.c @@ -235,9 +235,8 @@ wi_pci_attach(device_t dev) error = wi_attach(dev); if (error != 0) - return (error); - - return (0); + wi_free(dev); + return (error); } static int