Commit 12e37aef authored by Martin Kaiser's avatar Martin Kaiser Committed by Herbert Xu

hwrng: hisi - use dev_err_probe

Replace dev_err + return with dev_err_probe.
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent bc9ce934
......@@ -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;
}
......
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