summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-synquacer.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2020-09-01 18:27:11 +0300
committerMark Brown <broonie@kernel.org>2020-09-08 20:19:29 +0300
commit74ee6dc1257edf5fcfba67fd8075b766d11c42a0 (patch)
treef323f21e1d26f8fdfa0e3d24bcbc15b920357bd1 /drivers/spi/spi-synquacer.c
parenta05cec2dc2df1e5d25addb7aba398f3eb451e163 (diff)
downloadlinux-74ee6dc1257edf5fcfba67fd8075b766d11c42a0.tar.xz
spi: synquacer: 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/20200901152713.18629-9-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-synquacer.c')
-rw-r--r--drivers/spi/spi-synquacer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/spi/spi-synquacer.c b/drivers/spi/spi-synquacer.c
index ae17c99cce03..42e82dbe3d41 100644
--- a/drivers/spi/spi-synquacer.c
+++ b/drivers/spi/spi-synquacer.c
@@ -640,9 +640,8 @@ static int synquacer_spi_probe(struct platform_device *pdev)
}
if (IS_ERR(sspi->clk)) {
- if (!(PTR_ERR(sspi->clk) == -EPROBE_DEFER))
- dev_err(&pdev->dev, "clock not found\n");
- ret = PTR_ERR(sspi->clk);
+ ret = dev_err_probe(&pdev->dev, PTR_ERR(sspi->clk),
+ "clock not found\n");
goto put_spi;
}