Skip to content

Commit 5279f4a

Browse files
bibekpatromiquelraynal
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: stable@vger.kernel.org Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230913070702.12707-1-quic_bibekkum@quicinc.com
1 parent 9777cc1 commit 5279f4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)