diff options
Diffstat (limited to 'drivers/staging/rts5208/ms.c')
-rw-r--r-- | drivers/staging/rts5208/ms.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c index 7cdce87f3051..821256b95e22 100644 --- a/drivers/staging/rts5208/ms.c +++ b/drivers/staging/rts5208/ms.c @@ -2821,6 +2821,7 @@ BUILD_FAIL: int reset_ms_card(struct rtsx_chip *chip) { struct ms_info *ms_card = &chip->ms_card; + int seg_no = ms_card->total_block / 512 - 1; int retval; memset(ms_card, 0, sizeof(struct ms_info)); @@ -2863,7 +2864,7 @@ int reset_ms_card(struct rtsx_chip *chip) /* Build table for the last segment, * to check if L2P table block exists, erasing it */ - retval = ms_build_l2p_tbl(chip, ms_card->total_block / 512 - 1); + retval = ms_build_l2p_tbl(chip, seg_no); if (retval != STATUS_SUCCESS) { rtsx_trace(chip); return STATUS_FAIL; |