diff options
author | Martin Kaiser <martin@kaiser.cx> | 2023-07-13 09:04:46 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-07-22 13:59:37 +1200 |
commit | 1422e363516c8ac5183a72124bd860d796ebd9e7 (patch) | |
tree | 6ac4ee3e5821daa67e8e85f793dae5ad5fd3b6e2 /drivers/char/hw_random/ba431-rng.c | |
parent | 97b7aa77d1705ea25d484a77de44bf55d0a772a0 (diff) | |
download | linux-1422e363516c8ac5183a72124bd860d796ebd9e7.tar.gz linux-1422e363516c8ac5183a72124bd860d796ebd9e7.tar.bz2 linux-1422e363516c8ac5183a72124bd860d796ebd9e7.zip |
hwrng: ba431 - use dev_err_probe after failed registration
Use dev_err_probe to print the error message after a failed hwrng
registration.
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/ba431-rng.c')
-rw-r--r-- | drivers/char/hw_random/ba431-rng.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/hw_random/ba431-rng.c b/drivers/char/hw_random/ba431-rng.c index d2a9d16323a6..9de7466e6896 100644 --- a/drivers/char/hw_random/ba431-rng.c +++ b/drivers/char/hw_random/ba431-rng.c @@ -190,10 +190,8 @@ static int ba431_trng_probe(struct platform_device *pdev) ba431->rng.read = ba431_trng_read; ret = devm_hwrng_register(&pdev->dev, &ba431->rng); - if (ret) { - dev_err(&pdev->dev, "BA431 registration failed (%d)\n", ret); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, "BA431 registration failed\n"); dev_info(&pdev->dev, "BA431 TRNG registered\n"); |