diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-08-26 18:29:54 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-09-04 17:57:16 +1000 |
commit | d83d631b18e56aee51e4b8c89968952703e4de98 (patch) | |
tree | ec58d8ae9513a5195796c6df9c77573bea0cf401 /drivers/crypto/ccree | |
parent | 1b5d3a8b3000bf654d4ee92efee1e70f41912d13 (diff) | |
download | linux-d83d631b18e56aee51e4b8c89968952703e4de98.tar.gz linux-d83d631b18e56aee51e4b8c89968952703e4de98.tar.bz2 linux-d83d631b18e56aee51e4b8c89968952703e4de98.zip |
crypto: ccree - Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccree')
-rw-r--r-- | drivers/crypto/ccree/cc_driver.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/crypto/ccree/cc_driver.c b/drivers/crypto/ccree/cc_driver.c index 2d50991b9a17..6f519d3e896c 100644 --- a/drivers/crypto/ccree/cc_driver.c +++ b/drivers/crypto/ccree/cc_driver.c @@ -300,11 +300,8 @@ static int init_cc_resources(struct platform_device *plat_dev) new_drvdata->plat_dev = plat_dev; clk = devm_clk_get_optional(dev, NULL); - if (IS_ERR(clk)) { - if (PTR_ERR(clk) != -EPROBE_DEFER) - dev_err(dev, "Error getting clock: %pe\n", clk); - return PTR_ERR(clk); - } + if (IS_ERR(clk)) + return dev_err_probe(dev, PTR_ERR(clk), "Error getting clock\n"); new_drvdata->clk = clk; new_drvdata->coherent = of_dma_is_coherent(np); |