mmc: queue: Improve error handling during allocation of bounce buffers
authorBhuvanesh Surachari <bhuvanesh_surachari@mentor.com>
Mon, 1 Dec 2014 07:23:02 +0000 (02:23 -0500)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 5 Dec 2014 09:33:17 +0000 (10:33 +0100)
commitfdb409f636cd6fc3ac4e2f9c880402860e738554
tree34a579006f5fe970ec9646e5eaf882d3af4345a3
parent9d65cb88e5979d43f47c899601353ca61973ba90
mmc: queue: Improve error handling during allocation of bounce buffers

Allocation of previous bounce buffer in mmc_init_queue when the current
bounce buffer allocation fails was leading to a crash later in
__blk_segment_map_sg. Error handling is improved by allocating previous
bounce buffer only if the current bounce buffer allocation succeeds.

Signed-off-by: Bhuvanesh Surachari <bhuvanesh_surachari@mentor.com>
Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/card/queue.c