diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/core/host.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index f0dcddc34997..40dbe3c5fda7 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -379,7 +379,7 @@ again: err = ida_get_new_above(&mmc_host_ida, min_idx, &host->index); if (!err) { - if (host->index > max_idx) { + if (max_idx && (host->index > max_idx)) { ida_remove(&mmc_host_ida, host->index); err = -ENOSPC; } |