diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-09-10 18:07:06 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-09-14 15:50:17 +0100 |
commit | 9d99e55833dddf76dd6470e7ce97201abb612c03 (patch) | |
tree | 10e40108c6905a53ddc64092a9569951e04f3e79 /drivers/spi/spi-sprd-adi.c | |
parent | 6d66507d9b5507e26c5350d5a014b82c704124b8 (diff) | |
download | linux-9d99e55833dddf76dd6470e7ce97201abb612c03.tar.bz2 |
spi: sprd: 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>
Acked-by: Chunyan Zhang <zhang.lyra@gmail.com>
Link: https://lore.kernel.org/r/20200910160706.5883-1-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-sprd-adi.c')
-rw-r--r-- | drivers/spi/spi-sprd-adi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c index 127b8bd25831..392ec5cfa3d6 100644 --- a/drivers/spi/spi-sprd-adi.c +++ b/drivers/spi/spi-sprd-adi.c @@ -504,10 +504,7 @@ static int sprd_adi_probe(struct platform_device *pdev) dev_info(&pdev->dev, "no hardware spinlock supplied\n"); break; default: - dev_err(&pdev->dev, - "failed to find hwlock id, %d\n", ret); - fallthrough; - case -EPROBE_DEFER: + dev_err_probe(&pdev->dev, ret, "failed to find hwlock id\n"); goto put_ctlr; } } |