diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 4920ea1ece38a9b6b71c0d724290726fefcf1acf..e0363223996e609640d5c99d1583fe361173803e 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -637,6 +637,9 @@ static int mmc_blk_ioctl_multi_cmd(struct block_device *bdev, sizeof(num_of_cmds))) return -EFAULT; + if (!num_of_cmds) + return 0; + if (num_of_cmds > MMC_IOC_MAX_CMDS) return -EINVAL;