summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-11-02 20:10:09 +0000
committerimp <imp@FreeBSD.org>2003-11-02 20:10:09 +0000
commitdf6cf256ed0b852cf803c767cad95e65e628f872 (patch)
tree5a810c56360559b7d63d9530b8b41a2819fd767c
parentdbf45c3d8e568f200d44a5eb0cb61e4d71b772ac (diff)
downloadFreeBSD-src-df6cf256ed0b852cf803c767cad95e65e628f872.zip
FreeBSD-src-df6cf256ed0b852cf803c767cad95e65e628f872.tar.gz
MFp4:
o Minor tweak to error processing in ep_alloc.
-rw-r--r--sys/dev/ep/if_ep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 4fd8e33..fb64844 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -120,7 +120,7 @@ eeprom_rdy(struct ep_softc *sc)
if (i >= MAX_EEPROMBUSY) {
printf("ep%d: eeprom failed to come ready.\n", sc->unit);
- return (ENXIO);
+ return (ENXIO);
}
return (0);
@@ -217,6 +217,8 @@ ep_alloc(device_t dev)
sc->epb.res_cfg = result;
bad:
+ if (error != 0)
+ ep_free(dev);
return (error);
}
OpenPOWER on IntegriCloud