rtsx_read_cfg returns 0 on success.
Index: dev/ic/rtsx.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/rtsx.c,v
retrieving revision 1.6
diff -u -p -r1.6 rtsx.c
--- dev/ic/rtsx.c 6 Dec 2013 21:03:03 -0000 1.6
+++ dev/ic/rtsx.c 8 Dec 2013 16:26:42 -0000
@@ -175,7 +175,7 @@ rtsx_attach(struct rtsx_softc *sc, bus_s
if (rtsx_init(sc, 1))
return 1;
- if (rtsx_read_cfg(sc, 0, RTSX_SDIOCFG_REG, &sdio_cfg)) {
+ if (rtsx_read_cfg(sc, 0, RTSX_SDIOCFG_REG, &sdio_cfg) == 0) {
if ((sdio_cfg & RTSX_SDIOCFG_SDIO_ONLY) ||
(sdio_cfg & RTSX_SDIOCFG_HAVE_SDIO))
sc->flags |= RTSX_F_SDIO_SUPPORT;