projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a05cec2
)
spi: synquacer: Simplify with dev_err_probe()
author
Krzysztof Kozlowski
<krzk@kernel.org>
Tue, 1 Sep 2020 15:27:11 +0000
(17:27 +0200)
committer
Mark Brown
<broonie@kernel.org>
Tue, 8 Sep 2020 17:19:29 +0000
(18:19 +0100)
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>
drivers/spi/spi-synquacer.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-synquacer.c
b/drivers/spi/spi-synquacer.c
index
ae17c99
..
42e82db
100644
(file)
--- 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;
}