diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-06-17 17:10:18 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-06-17 17:10:18 +0000 |
commit | ff0afab1c10609bb344fa5fde2c7aa690c2f368c (patch) | |
tree | eb78bca50ac0b408aa4753989dc2d12ddab39d3e /sys | |
parent | c4827dbec6fb7dc217a25b3ee350d066bef9e0c6 (diff) |
Add curly braces to the if-condition to make sure the bus width
is only bumped if the high-speed mode is available.
ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sdmmc/sdmmc_io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/sdmmc/sdmmc_io.c b/sys/dev/sdmmc/sdmmc_io.c index 3b8effc7943..88d011677cb 100644 --- a/sys/dev/sdmmc/sdmmc_io.c +++ b/sys/dev/sdmmc/sdmmc_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdmmc_io.c,v 1.38 2018/06/04 15:04:57 deraadt Exp $ */ +/* $OpenBSD: sdmmc_io.c,v 1.39 2018/06/17 17:10:17 patrick Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -186,14 +186,14 @@ sdmmc_io_init(struct sdmmc_softc *sc, struct sdmmc_function *sf) if (sf->number == 0) { if (ISSET(sc->sc_caps, SMC_CAPS_SD_HIGHSPEED) && - sdmmc_io_set_highspeed(sf, 1) == 0) + sdmmc_io_set_highspeed(sf, 1) == 0) { (void)sdmmc_chip_bus_clock(sc->sct, sc->sch, SDMMC_SDCLK_50MHZ, SDMMC_TIMING_HIGHSPEED); if (ISSET(sc->sc_caps, SMC_CAPS_4BIT_MODE)) { sdmmc_io_set_bus_width(sf, 4); sdmmc_chip_bus_width(sc->sct, sc->sch, 4); } - else + } else (void)sdmmc_chip_bus_clock(sc->sct, sc->sch, SDMMC_SDCLK_25MHZ, SDMMC_TIMING_LEGACY); } |