crypto: s5p-sss - Pass error from clk_get and reduce verbosity on deferral

Pass the error directly from devm_clk_get() to describe the real reason,
instead of fixed ENOENT.  Do not print error messages on deferred probe.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Kamil Konieczny <k.konieczny@samsung.com>
Acked-by: Kamil Konieczny <k.konieczny@samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Krzysztof Kozlowski 2020-09-03 20:04:00 +02:00 committed by Herbert Xu
parent 98a6bc102b
commit b7da560ea2
1 changed files with 7 additions and 8 deletions

View File

@ -2201,11 +2201,10 @@ static int s5p_aes_probe(struct platform_device *pdev)
} }
pdata->clk = devm_clk_get(dev, variant->clk_names[0]); pdata->clk = devm_clk_get(dev, variant->clk_names[0]);
if (IS_ERR(pdata->clk)) { if (IS_ERR(pdata->clk))
dev_err(dev, "failed to find secss clock %s\n", return dev_err_probe(dev, PTR_ERR(pdata->clk),
variant->clk_names[0]); "failed to find secss clock %s\n",
return -ENOENT; variant->clk_names[0]);
}
err = clk_prepare_enable(pdata->clk); err = clk_prepare_enable(pdata->clk);
if (err < 0) { if (err < 0) {
@ -2217,9 +2216,9 @@ static int s5p_aes_probe(struct platform_device *pdev)
if (variant->clk_names[1]) { if (variant->clk_names[1]) {
pdata->pclk = devm_clk_get(dev, variant->clk_names[1]); pdata->pclk = devm_clk_get(dev, variant->clk_names[1]);
if (IS_ERR(pdata->pclk)) { if (IS_ERR(pdata->pclk)) {
dev_err(dev, "failed to find clock %s\n", err = dev_err_probe(dev, PTR_ERR(pdata->pclk),
variant->clk_names[1]); "failed to find clock %s\n",
err = -ENOENT; variant->clk_names[1]);
goto err_clk; goto err_clk;
} }