mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
hwrng: cctrng - simplify cctrng_probe()
Handle the error directly and drop the goto statement. Signed-off-by: Thorsten Blum <blum@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
cc29ce88b1
commit
a7ea3d63e8
|
|
@ -534,7 +534,8 @@ static int cctrng_probe(struct platform_device *pdev)
|
|||
rc = devm_hwrng_register(dev, &drvdata->rng);
|
||||
if (rc) {
|
||||
dev_err(dev, "Could not register hwrng device.\n");
|
||||
goto post_pm_err;
|
||||
cc_trng_pm_fini(drvdata);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* trigger HW to start generate data */
|
||||
|
|
@ -547,11 +548,6 @@ static int cctrng_probe(struct platform_device *pdev)
|
|||
dev_info(dev, "ARM cctrng device initialized\n");
|
||||
|
||||
return 0;
|
||||
|
||||
post_pm_err:
|
||||
cc_trng_pm_fini(drvdata);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void cctrng_remove(struct platform_device *pdev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user