diff options
author | 2017-09-07 17:00:28 +0000 | |
---|---|---|
committer | 2017-09-07 17:00:28 +0000 | |
commit | adc32ee9d9b00805f7321e2d19a32a9cfbdc7f02 (patch) | |
tree | acdbcd5e371aaaa820083b9e49d6ecc19dd2d287 | |
parent | Update hardware list. (diff) | |
download | wireguard-openbsd-adc32ee9d9b00805f7321e2d19a32a9cfbdc7f02.tar.xz wireguard-openbsd-adc32ee9d9b00805f7321e2d19a32a9cfbdc7f02.zip |
Check return of rtsx_write in previous commit as RTSX_WRITE macro
does
Coverity CID 1455437
-rw-r--r-- | sys/dev/ic/rtsx.c | 10 |
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); |