Skip to content

Commit f00ab14

Browse files
olofjstorulf
authored andcommitted
mmc: block: return error on failed mmc_blk_get()
This used to return -EFAULT, but the function above returns -EINVAL on the same condition so let's stick to that. The removal of error return on this path was introduced with b093410 ('mmc: block: copy resp[] data on err for MMC_IOC_MULTI_CMD'). Fixes: b093410 ('mmc: block: copy resp[] data on err for MMC_IOC_MULTI_CMD'). Signed-off-by: Olof Johansson <olof@lixom.net> Cc: Grant Grundler <grundler@google.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 07e7716 commit f00ab14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mmc/card/block.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,10 @@ static int mmc_blk_ioctl_multi_cmd(struct block_device *bdev,
655655
}
656656

657657
md = mmc_blk_get(bdev->bd_disk);
658-
if (!md)
658+
if (!md) {
659+
err = -EINVAL;
659660
goto cmd_err;
661+
}
660662

661663
card = md->queue.card;
662664
if (IS_ERR(card)) {

0 commit comments

Comments
 (0)