Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5905ff1 authored by Chuanxiao Dong's avatar Chuanxiao Dong Committed by Ulf Hansson
Browse files

mmc: debugfs: Add a restriction to mmc debugfs clock setting



Clock frequency values written to an mmc host should not be less than
the minimum clock frequency which the mmc host supports.

Signed-off-by: default avatarYuan Juntao <juntaox.yuan@intel.com>
Signed-off-by: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 1d6ad057
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ static int mmc_clock_opt_set(void *data, u64 val)
	struct mmc_host *host = data;

	/* We need this check due to input value is u64 */
	if (val > host->f_max)
	if (val != 0 && (val > host->f_max || val < host->f_min))
		return -EINVAL;

	mmc_claim_host(host);