mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 15:11:50 +00:00
drivers/char/hw_random: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
29589f06d2
commit
2a9ba2ee5f
@ -167,11 +167,6 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
|
||||
clk_prepare_enable(mxc_rng->clk);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res) {
|
||||
err = -ENOENT;
|
||||
goto err_region;
|
||||
}
|
||||
|
||||
mxc_rng->mem = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(mxc_rng->mem)) {
|
||||
err = PTR_ERR(mxc_rng->mem);
|
||||
@ -189,7 +184,6 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
err_ioremap:
|
||||
err_region:
|
||||
clk_disable_unprepare(mxc_rng->clk);
|
||||
|
||||
out:
|
||||
|
@ -119,11 +119,6 @@ static int omap_rng_probe(struct platform_device *pdev)
|
||||
dev_set_drvdata(&pdev->dev, priv);
|
||||
|
||||
priv->mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!priv->mem_res) {
|
||||
ret = -ENOENT;
|
||||
goto err_ioremap;
|
||||
}
|
||||
|
||||
priv->base = devm_ioremap_resource(&pdev->dev, priv->mem_res);
|
||||
if (IS_ERR(priv->base)) {
|
||||
ret = PTR_ERR(priv->base);
|
||||
|
Loading…
Reference in New Issue
Block a user