mirror of
https://github.com/raspberrypi/linux.git
synced 2026-01-02 07:43:34 +00:00
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 <robh@kernel.org> Link: https://lore.kernel.org/r/20231006213835.332848-1-robh@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_dma.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user