diff options
author | Martin Kaiser <martin@kaiser.cx> | 2024-02-26 19:57:00 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-03-08 19:23:24 +0800 |
commit | 12e37aef7ba20a5a0d6e076968a41293b019e90d (patch) | |
tree | 77d2139d66980de2f0742c66e87427cae7d84dc5 /drivers/char | |
parent | bc9ce934c469d594d77c44b41a90570fc8881e4d (diff) |
hwrng: hisi - use dev_err_probe
Replace dev_err + return with dev_err_probe.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hw_random/hisi-rng.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/hw_random/hisi-rng.c b/drivers/char/hw_random/hisi-rng.c index b6f27566e0ba..4e501d5c121f 100644 --- a/drivers/char/hw_random/hisi-rng.c +++ b/drivers/char/hw_random/hisi-rng.c @@ -89,10 +89,8 @@ static int hisi_rng_probe(struct platform_device *pdev) rng->rng.read = hisi_rng_read; ret = devm_hwrng_register(&pdev->dev, &rng->rng); - if (ret) { - dev_err(&pdev->dev, "failed to register hwrng\n"); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, "failed to register hwrng\n"); return 0; } |