mmc: block: Return error in case of partition switch failure

If some error occurs in mmc_blk_cmdq_part_switch() function,
the error is not being passed to higher layers to inform the
failure. Instead it returns zero even though no request is
completed with success. This change returns error to higher
layers in case of any failures in mmc_blk_cmdq_part_switch.

Change-Id: Icd1d2d9bc6bb5bd16bc24706fb20603cc33cee40
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
This commit is contained in:
Sayali Lokhande 2017-10-04 15:42:18 +05:30 committed by Gerrit - the friendly Code Review server
parent b889d4d995
commit 0eb1e72abb

View file

@ -4000,7 +4000,7 @@ static int mmc_blk_cmdq_issue_rq(struct mmc_queue *mq, struct request *req)
} else {
pr_err("%s: %s: partition switch failed err = %d\n",
md->disk->disk_name, __func__, err);
ret = 0;
ret = err;
goto out;
}
}