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>
This commit is contained in:
Jia-Ju Bai 2021-03-04 18:14:45 -08:00 committed by Ulf Hansson
parent 407a1c570f
commit 8c87dab92f
1 changed files with 2 additions and 1 deletions

View File

@ -1382,7 +1382,8 @@ static int mspro_block_resume(struct memstick_dev *card)
new_msb->card = card; new_msb->card = card;
memstick_set_drvdata(card, new_msb); memstick_set_drvdata(card, new_msb);
if (mspro_block_init_card(card)) rc = mspro_block_init_card(card);
if (rc)
goto out_free; goto out_free;
for (cnt = 0; new_msb->attr_group.attrs[cnt] for (cnt = 0; new_msb->attr_group.attrs[cnt]