|
@@ -1121,6 +1121,15 @@ int tmio_mmc_host_probe(struct tmio_mmc_host **host,
|
|
mmc->f_min = mmc->f_max / 512;
|
|
mmc->f_min = mmc->f_max / 512;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Check the sanity of mmc->f_min to prevent tmio_mmc_set_clock() from
|
|
|
|
+ * looping forever...
|
|
|
|
+ */
|
|
|
|
+ if (mmc->f_min == 0) {
|
|
|
|
+ ret = -EINVAL;
|
|
|
|
+ goto host_free;
|
|
|
|
+ }
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* While using internal tmio hardware logic for card detection, we need
|
|
* While using internal tmio hardware logic for card detection, we need
|
|
* to ensure it stays powered for it to work.
|
|
* to ensure it stays powered for it to work.
|