diff options
author | Martin Kaiser <martin@kaiser.cx> | 2023-08-24 22:40:37 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-09-15 13:29:45 +0300 |
commit | 337be41e07a6a32029d14306d71f764f0f80e318 (patch) | |
tree | c8d3dee45d9d482531cc815169b17b2822936058 /drivers/char/hw_random | |
parent | 2db18098d5ad99306b48146e77c51584fcfe5991 (diff) | |
download | linux-337be41e07a6a32029d14306d71f764f0f80e318.tar.xz |
hwrng: ks-sa - use dev_err_probe
Replace dev_err + return with dev_err_probe.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/ks-sa-rng.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/char/hw_random/ks-sa-rng.c b/drivers/char/hw_random/ks-sa-rng.c index 70d21bf657ce..dff7b9db7044 100644 --- a/drivers/char/hw_random/ks-sa-rng.c +++ b/drivers/char/hw_random/ks-sa-rng.c @@ -228,17 +228,14 @@ static int ks_sa_rng_probe(struct platform_device *pdev) syscon_regmap_lookup_by_phandle(dev->of_node, "ti,syscon-sa-cfg"); - if (IS_ERR(ks_sa_rng->regmap_cfg)) { - dev_err(dev, "syscon_node_to_regmap failed\n"); - return -EINVAL; - } + if (IS_ERR(ks_sa_rng->regmap_cfg)) + return dev_err_probe(dev, -EINVAL, "syscon_node_to_regmap failed\n"); pm_runtime_enable(dev); ret = pm_runtime_resume_and_get(dev); if (ret < 0) { - dev_err(dev, "Failed to enable SA power-domain\n"); pm_runtime_disable(dev); - return ret; + return dev_err_probe(dev, ret, "Failed to enable SA power-domain\n"); } return devm_hwrng_register(&pdev->dev, &ks_sa_rng->rng); |