Commit e396de68 authored by Christian Lütke-Stetzkamp's avatar Christian Lütke-Stetzkamp Committed by Greg Kroah-Hartman

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: 8f239558 ("staging: mt7621-mmc: Refactor msdc_init_gpd_bd")
Reported-by: default avatarNeilBrown <neil@brown.name>
Signed-off-by: default avatarChristian Lütke-Stetzkamp <christian@lkamp.de>
Tested-by: default avatarNeilBrown <neil@brown.name>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2175b615
...@@ -2505,7 +2505,7 @@ static void msdc_init_gpd_bd(struct msdc_host *host, struct msdc_dma *dma) ...@@ -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); memset(bd, 0, sizeof(struct bd) * MAX_BD_NUM);
for (i = 0; i < (MAX_BD_NUM - 1); i++) 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) static int msdc_drv_probe(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment