projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mmc: debugfs: Add a restriction to mmc debugfs clock setting
[platform/kernel/linux-rpi.git]
/
drivers
/
mmc
/
core
/
debugfs.c
diff --git
a/drivers/mmc/core/debugfs.c
b/drivers/mmc/core/debugfs.c
index
65cc0ac
..
9382a57
100644
(file)
--- a/
drivers/mmc/core/debugfs.c
+++ b/
drivers/mmc/core/debugfs.c
@@
-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);