Skip to content

Commit

Permalink
hwrng: hisi - use dev_err_probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
martin-kaiser authored and herbertx committed Mar 8, 2024
1 parent bc9ce93 commit 12e37ae
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/char/hw_random/hisi-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 12e37ae

Please sign in to comment.