summaryrefslogtreecommitdiff
path: root/drivers/memstick
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2021-03-04 18:14:45 -0800
committerUlf Hansson <ulf.hansson@linaro.org>2021-03-30 11:42:02 +0200
commit8c87dab92f90c4c8f45d7ac302da878e269d3695 (patch)
treeb97a3e59c5613a52f9e8e774b823170e976a5093 /drivers/memstick
parent407a1c570f9248886be21a396c0ea7f7f5e7b3cc (diff)
memstick: core: Assign error code of mspro_block_resume()
When mspro_block_init_card() fails, no error return code of mspro_block_resume() is assigned/propagated. Let's fix this. Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Link: https://lore.kernel.org/r/20210305021445.3435-1-baijiaju1990@gmail.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/memstick')
-rw-r--r--drivers/memstick/core/mspro_block.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c
index afb892e7ffc6..cf7fe0d58ee7 100644
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -1382,7 +1382,8 @@ static int mspro_block_resume(struct memstick_dev *card)
new_msb->card = card;
memstick_set_drvdata(card, new_msb);
- if (mspro_block_init_card(card))
+ rc = mspro_block_init_card(card);
+ if (rc)
goto out_free;
for (cnt = 0; new_msb->attr_group.attrs[cnt]