diff options
| -rw-r--r-- | drivers/mmc/core/block.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 54a923ba4f1e..e760d13ee325 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -3337,6 +3337,11 @@ static int __init mmc_blk_init(void) { int res; + if (perdev_minors <= 0) { + pr_err("mmcblk: invalid minors per device: %d\n", perdev_minors); + return -EINVAL; + } + res = bus_register(&mmc_rpmb_bus_type); if (res < 0) { pr_err("mmcblk: could not register RPMB bus type\n"); |
