summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChristian Lütke-Stetzkamp <christian@lkamp.de>2018-04-25 08:43:18 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-25 15:36:20 +0200
commite396de684ebea31bde476423edcb087432f46729 (patch)
tree5f3ca7e3e3a58656b300888e208f4250a974e19d /drivers
parent2175b6157acb78b6dafc8b717c67cc28891d43d5 (diff)
staging: mt7621-mmc: Fix calculation typo in msdc_init_gpd_bd
When refactoring the function msdc_init_gpd_bd, an error in the calculation of the bd.next address was introduced. The offset has to be added to the base address, not multiplied. Fixes: 8f2395586cf0 ("staging: mt7621-mmc: Refactor msdc_init_gpd_bd") Reported-by: NeilBrown <neil@brown.name> Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Tested-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/mt7621-mmc/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index ae70f9d0b346..a003f8324088 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -2505,7 +2505,7 @@ static void msdc_init_gpd_bd(struct msdc_host *host, struct msdc_dma *dma)
memset(bd, 0, sizeof(struct bd) * MAX_BD_NUM);
for (i = 0; i < (MAX_BD_NUM - 1); i++)
- bd[i].next = (void *)(dma->bd_addr * sizeof(*bd) * (i + 1));
+ bd[i].next = (void *)(dma->bd_addr + sizeof(*bd) * (i + 1));
}
static int msdc_drv_probe(struct platform_device *pdev)