summaryrefslogtreecommitdiffstats
path: root/sys/dev/wi/if_wi_pccard.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-06-11 16:39:20 +0000
committerimp <imp@FreeBSD.org>2003-06-11 16:39:20 +0000
commit8df22fdf988ffcbc8fb899887ec8754bc7e45641 (patch)
tree9c1968e274a58f0c02742cb82190503ef4af2b1c /sys/dev/wi/if_wi_pccard.c
parentdf7799dd7709814ba2d70700ad2ac7570c02fbf2 (diff)
downloadFreeBSD-src-8df22fdf988ffcbc8fb899887ec8754bc7e45641.zip
FreeBSD-src-8df22fdf988ffcbc8fb899887ec8754bc7e45641.tar.gz
Call wi_free on the failure cases of pccard.
Tested by: scottl
Diffstat (limited to 'sys/dev/wi/if_wi_pccard.c')
-rw-r--r--sys/dev/wi/if_wi_pccard.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/wi/if_wi_pccard.c b/sys/dev/wi/if_wi_pccard.c
index ac428fe..fd4c38a 100644
--- a/sys/dev/wi/if_wi_pccard.c
+++ b/sys/dev/wi/if_wi_pccard.c
@@ -210,6 +210,7 @@ wi_pccard_attach(device_t dev)
int error;
uint32_t vendor;
uint32_t product;
+ int retval;
sc = device_get_softc(dev);
@@ -237,10 +238,13 @@ wi_pccard_attach(device_t dev)
#else
device_printf(dev,
"Symbol LA4100 needs 'option WI_SYMBOL_FIRMWARE'\n");
+ wi_free(dev);
return (ENXIO);
#endif
}
#endif
-
- return (wi_attach(dev));
+ retval = wi_attach(dev);
+ if (retval != 0)
+ wi_free(dev);
+ return (retval);
}
OpenPOWER on IntegriCloud