[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1455039270-30204-1-git-send-email-olof@lixom.net>
Date: Tue, 9 Feb 2016 09:34:30 -0800
From: Olof Johansson <olof@...om.net>
To: ulf.hansson@...aro.org
Cc: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
Olof Johansson <olof@...om.net>,
Grant Grundler <grundler@...gle.com>
Subject: [PATCH] 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 b093410c9aef
('mmc: block: copy resp[] data on err for MMC_IOC_MULTI_CMD').
Fixes: b093410c9aef ('mmc: block: copy resp[] data on err for MMC_IOC_MULTI_CMD').
Signed-off-by: Olof Johansson <olof@...om.net>
Cc: Grant Grundler <grundler@...gle.com>
---
drivers/mmc/card/block.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 57a5b6d..b3ec4fb 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -655,8 +655,10 @@ static int mmc_blk_ioctl_multi_cmd(struct block_device *bdev,
}
md = mmc_blk_get(bdev->bd_disk);
- if (!md)
+ if (!md) {
+ err = -EINVAL;
goto cmd_err;
+ }
card = md->queue.card;
if (IS_ERR(card)) {
--
2.1.4
Powered by blists - more mailing lists