From 729a248d6378ff8c4094f8b69bd33a58daa403bd Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 11 Jun 2003 16:41:07 +0000 Subject: [PATCH] Call wi_free() in all the relevant error cases. --- sys/dev/wi/if_wi_pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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