diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2006-07-17 20:50:59 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2006-07-17 20:50:59 +0000 |
commit | 76dc2310a346ee2d8384fb5c1c58e217935967e7 (patch) | |
tree | b4058a7b6bdf07db1135f9acc023c8cc4949dbc6 /sys | |
parent | fb8fa2baab9637eec71161e51d7bf82081e540ce (diff) |
silently return if sdmmc is disabled/not in the kernel. uwe@ ok.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sdmmc/sdhc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c index 4900cc7669e..53e111164fe 100644 --- a/sys/dev/sdmmc/sdhc.c +++ b/sys/dev/sdmmc/sdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhc.c,v 1.7 2006/07/17 20:48:27 fgsch Exp $ */ +/* $OpenBSD: sdhc.c,v 1.8 2006/07/17 20:50:58 fgsch Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -138,6 +138,7 @@ sdhc_host_found(struct sdhc_softc *sc, bus_space_tag_t iot, struct sdmmcbus_attach_args saa; struct sdhc_host *hp; u_int32_t caps; + int error = 1; #ifdef SDHC_DEBUG u_int16_t version; @@ -241,7 +242,7 @@ sdhc_host_found(struct sdhc_softc *sc, bus_space_tag_t iot, hp->sdmmc = config_found(&sc->sc_dev, &saa, NULL); if (hp->sdmmc == NULL) { - printf("%s: can't attach bus\n", sc->sc_dev.dv_xname); + error = 0; goto err; } @@ -261,7 +262,7 @@ err: FREE(hp, M_DEVBUF); sc->sc_host[sc->sc_nhosts - 1] = NULL; sc->sc_nhosts--; - return 1; + return (error); } void |