summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2013-12-08 18:31:04 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2013-12-08 18:31:04 +0000
commit59e8eafe1dcc4160b84234417a4caaa4db0ee9e7 (patch)
tree593a3a2cb1aaf8712ac2ed8d631262ad4656ad4a /sys
parent20e28904dbbae880e6ce3e452c574468f571f7e1 (diff)
Fix rtsx_read_cfg() return value check in rtsx_attach(). Diff from dhill.
Bug didn't have any bad effects since rtsx doesn't support SDIO at present.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/rtsx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/rtsx.c b/sys/dev/ic/rtsx.c
index 63c929e827a..63042edc3b5 100644
--- a/sys/dev/ic/rtsx.c
+++ b/sys/dev/ic/rtsx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsx.c,v 1.6 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: rtsx.c,v 1.7 2013/12/08 18:31:03 stsp Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -175,7 +175,7 @@ rtsx_attach(struct rtsx_softc *sc, bus_space_tag_t iot,
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;