Commit 1422e363 authored by Martin Kaiser's avatar Martin Kaiser Committed by Herbert Xu

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: default avatarMartin Kaiser <martin@kaiser.cx>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 97b7aa77
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment