summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJoshua Stein <jcs@cvs.openbsd.org>2017-09-07 17:00:29 +0000
committerJoshua Stein <jcs@cvs.openbsd.org>2017-09-07 17:00:29 +0000
commit074a3300bb568383ebca0b31bab042ca64f911ec (patch)
treebe9c911f534286490744f3d736fe893edd0104a9 /sys/dev
parentb750221bc7129c57a282f7b58ac32ede1c4d2f57 (diff)
Check return of rtsx_write in previous commit as RTSX_WRITE macro
does Coverity CID 1455437
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/rtsx.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/ic/rtsx.c b/sys/dev/ic/rtsx.c
index a9c3e9309b0..27fa201f600 100644
--- a/sys/dev/ic/rtsx.c
+++ b/sys/dev/ic/rtsx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsx.c,v 1.18 2017/09/06 13:07:38 jcs Exp $ */
+/* $OpenBSD: rtsx.c,v 1.19 2017/09/07 17:00:28 jcs Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -462,10 +462,14 @@ int
rtsx_bus_power_on(struct rtsx_softc *sc)
{
u_int8_t enable3;
+ int err;
- if (sc->flags & RTSX_F_525A)
- rtsx_write(sc, RTSX_LDO_VCC_CFG1, RTSX_LDO_VCC_TUNE_MASK,
+ if (sc->flags & RTSX_F_525A) {
+ err = rtsx_write(sc, RTSX_LDO_VCC_CFG1, RTSX_LDO_VCC_TUNE_MASK,
RTSX_LDO_VCC_3V3);
+ if (err)
+ return (err);
+ }
/* Select SD card. */
RTSX_WRITE(sc, RTSX_CARD_SELECT, RTSX_SD_MOD_SEL);