diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-03-11 23:51:16 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-03-11 23:51:16 +0000 |
commit | 16b28103432692f21f24ff02f6d001f50a29c7f3 (patch) | |
tree | 7566c152c6ba7a4938acfe088e80d5caeb0a8e17 /sys/dev/cardbus/if_acx_cardbus.c | |
parent | 7aac46a827ca86dd4536aaeafda2fc5d206e31da (diff) |
Do more error checking in acx(4).
"If it works for you, commit it. The diff looks right." claudio@
"Seems to work here with ACX111 CardBus" jsg@
Diffstat (limited to 'sys/dev/cardbus/if_acx_cardbus.c')
-rw-r--r-- | sys/dev/cardbus/if_acx_cardbus.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/cardbus/if_acx_cardbus.c b/sys/dev/cardbus/if_acx_cardbus.c index 6a3e9e714c7..a7affd687b8 100644 --- a/sys/dev/cardbus/if_acx_cardbus.c +++ b/sys/dev/cardbus/if_acx_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_acx_cardbus.c,v 1.12 2009/02/26 23:03:05 stsp Exp $ */ +/* $OpenBSD: if_acx_cardbus.c,v 1.13 2009/03/11 23:51:15 stsp Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -220,13 +220,18 @@ acx_cardbus_detach(struct device *self, int flags) int acx_cardbus_enable(struct acx_softc *sc) { - struct acx_cardbus_softc *csc = (struct acx_cardbus_softc *)sc; + struct acx_cardbus_softc *csc; + int error; + + csc = (struct acx_cardbus_softc *)sc; cardbus_devfunc_t ct = csc->sc_ct; cardbus_chipset_tag_t cc = ct->ct_cc; cardbus_function_tag_t cf = ct->ct_cf; /* power on the socket */ - Cardbus_function_enable(ct); + error = Cardbus_function_enable(ct); + if (error) + return error; /* setup the PCI configuration registers */ acx_cardbus_setup(csc); |