From c48de45d4cefc5a2f0d0e4101c39884326ac704c Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 6 Oct 2023 16:38:35 -0500 Subject: dmaengine: Drop unnecessary of_match_device() calls If probe is reached, we've already matched the device and in the case of DT matching, the struct device_node pointer will be set. Therefore, there is no need to call of_match_device() in probe. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231006213835.332848-1-robh@kernel.org Signed-off-by: Vinod Koul --- drivers/dma/stm32-dma.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'drivers/dma/stm32-dma.c') diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c index a732b3807b11..c8089e77c950 100644 --- a/drivers/dma/stm32-dma.c +++ b/drivers/dma/stm32-dma.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -1561,17 +1560,10 @@ static int stm32_dma_probe(struct platform_device *pdev) struct stm32_dma_chan *chan; struct stm32_dma_device *dmadev; struct dma_device *dd; - const struct of_device_id *match; struct resource *res; struct reset_control *rst; int i, ret; - match = of_match_device(stm32_dma_of_match, &pdev->dev); - if (!match) { - dev_err(&pdev->dev, "Error: No device match found\n"); - return -ENODEV; - } - dmadev = devm_kzalloc(&pdev->dev, sizeof(*dmadev), GFP_KERNEL); if (!dmadev) return -ENOMEM; -- cgit v1.2.3