mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 02:06:49 +07:00
hwrng: mxc-rnga - Check the return value from clk_prepare_enable()
clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
69d2884deb
commit
9e01d0c6f6
@ -164,7 +164,9 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
|
||||
goto out;
|
||||
}
|
||||
|
||||
clk_prepare_enable(mxc_rng->clk);
|
||||
err = clk_prepare_enable(mxc_rng->clk);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
mxc_rng->mem = devm_ioremap_resource(&pdev->dev, res);
|
||||
|
Loading…
Reference in New Issue
Block a user