* [PATCH] mmc: block: return error on failed mmc_blk_get()
@ 2016-02-09 17:34 Olof Johansson
2016-02-10 8:18 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Olof Johansson @ 2016-02-09 17:34 UTC (permalink / raw)
To: ulf.hansson; +Cc: linux-mmc, linux-kernel, Olof Johansson, Grant Grundler
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@lixom.net>
Cc: Grant Grundler <grundler@google.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: block: return error on failed mmc_blk_get()
2016-02-09 17:34 [PATCH] mmc: block: return error on failed mmc_blk_get() Olof Johansson
@ 2016-02-10 8:18 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2016-02-10 8:18 UTC (permalink / raw)
To: Olof Johansson; +Cc: linux-mmc, linux-kernel, Grant Grundler
On 9 February 2016 at 18:34, Olof Johansson <olof@lixom.net> wrote:
> 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@lixom.net>
> Cc: Grant Grundler <grundler@google.com>
Thanks, applied for fixes!
Kind regards
Uffe
> ---
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-10 8:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 17:34 [PATCH] mmc: block: return error on failed mmc_blk_get() Olof Johansson
2016-02-10 8:18 ` Ulf Hansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.