Skip to content

Commit

Permalink
memstick: core: Assign error code of mspro_block_resume()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jia-Ju Bai <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
  • Loading branch information
XidianGeneral authored and storulf committed Mar 30, 2021
1 parent 407a1c5 commit 8c87dab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/memstick/core/mspro_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 8c87dab

Please sign in to comment.