Commit 18ac6a2c authored by Olof Johansson's avatar Olof Johansson Committed by Kleber Sacilotto de Souza

mmc: block: return error on failed mmc_blk_get()

BugLink: https://bugs.launchpad.net/bugs/1878232

commit f00ab14c upstream.

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 b093410c
('mmc: block: copy resp[] data on err for MMC_IOC_MULTI_CMD').

Fixes: b093410c ('mmc: block: copy resp[] data on err for MMC_IOC_MULTI_CMD').
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Cc: Grant Grundler <grundler@google.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 900920c0
...@@ -668,8 +668,10 @@ static int mmc_blk_ioctl_multi_cmd(struct block_device *bdev, ...@@ -668,8 +668,10 @@ static int mmc_blk_ioctl_multi_cmd(struct block_device *bdev,
} }
md = mmc_blk_get(bdev->bd_disk); md = mmc_blk_get(bdev->bd_disk);
if (!md) if (!md) {
err = -EINVAL;
goto cmd_err; goto cmd_err;
}
card = md->queue.card; card = md->queue.card;
if (IS_ERR(card)) { if (IS_ERR(card)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment