Skip to content

Commit 5279f4a

Browse files
Bibek Kumar Patromiquelraynal
authored andcommitted
mtd: rawnand: qcom: Unmap the right resource upon probe failure
We currently provide the physical address of the DMA region rather than the output of dma_map_resource() which is obviously wrong. Fixes: 7330fc5 ("mtd: rawnand: qcom: stop using phys_to_dma()") Cc: [email protected] Reviewed-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Bibek Kumar Patro <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 9777cc1 commit 5279f4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/nand/raw/qcom_nandc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3444,7 +3444,7 @@ static int qcom_nandc_probe(struct platform_device *pdev)
34443444
err_aon_clk:
34453445
clk_disable_unprepare(nandc->core_clk);
34463446
err_core_clk:
3447-
dma_unmap_resource(dev, res->start, resource_size(res),
3447+
dma_unmap_resource(dev, nandc->base_dma, resource_size(res),
34483448
DMA_BIDIRECTIONAL, 0);
34493449
return ret;
34503450
}

0 commit comments

Comments
 (0)