summaryrefslogtreecommitdiffstats
path: root/drivers/dma/stm32-dmamux.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2020-08-28 17:26:36 +0200
committerVinod Koul <vkoul@kernel.org>2020-09-03 09:08:59 +0200
commit1c966e1d948ba1abf646966ff5f0e57634ae70b7 (patch)
tree491f25f146cd5fc012826891cccb8368818fb631 /drivers/dma/stm32-dmamux.c
parentdmaengine: pl330: Simplify with dev_err_probe() (diff)
downloadlinux-1c966e1d948ba1abf646966ff5f0e57634ae70b7.tar.xz
linux-1c966e1d948ba1abf646966ff5f0e57634ae70b7.zip
dmaengine: stm32: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200828152637.16903-2-krzk@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/stm32-dmamux.c')
-rw-r--r--drivers/dma/stm32-dmamux.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
index 12f7637e13a1..a10ccd964376 100644
--- a/drivers/dma/stm32-dmamux.c
+++ b/drivers/dma/stm32-dmamux.c
@@ -252,12 +252,9 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
spin_lock_init(&stm32_dmamux->lock);
stm32_dmamux->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(stm32_dmamux->clk)) {
- ret = PTR_ERR(stm32_dmamux->clk);
- if (ret != -EPROBE_DEFER)
- dev_err(&pdev->dev, "Missing clock controller\n");
- return ret;
- }
+ if (IS_ERR(stm32_dmamux->clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(stm32_dmamux->clk),
+ "Missing clock controller\n");
ret = clk_prepare_enable(stm32_dmamux->clk);
if (ret < 0) {