diff options
| author | Jessica Clarke <jrtc27@FreeBSD.org> | 2021-09-29 12:59:13 +0000 |
|---|---|---|
| committer | Jessica Clarke <jrtc27@FreeBSD.org> | 2021-09-29 12:59:13 +0000 |
| commit | 4a331971d2f1083f35b87197da0614fa3e0e53cb (patch) | |
| tree | 7b25c4616ae8bc56929d8fe8ee649c56f5c08de8 /sys/dev/mmc | |
| parent | c39eefe715b3c835ce3d91a1c1932197c23c1f3c (diff) | |
Diffstat (limited to 'sys/dev/mmc')
| -rw-r--r-- | sys/dev/mmc/mmc_helpers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/mmc/mmc_helpers.c b/sys/dev/mmc/mmc_helpers.c index 0e1e16666367..1a90f291fc47 100644 --- a/sys/dev/mmc/mmc_helpers.c +++ b/sys/dev/mmc/mmc_helpers.c @@ -105,9 +105,9 @@ mmc_parse(device_t dev, struct mmc_helper *helper, struct mmc_host *host) * if it's not present based on the clock that the mmc controller * operates on */ - max_freq = 0; - device_get_property(dev, "max-frequency", &max_freq, sizeof(uint64_t)); - host->f_max = max_freq; + if (device_get_property(dev, "max-frequency", &max_freq, + sizeof(uint64_t)) > 0) + host->f_max = max_freq; if (device_has_property(dev, "broken-cd")) helper->props |= MMC_PROP_BROKEN_CD; |
