diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2013-05-12 09:19:46 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-05-12 09:19:46 -0400 |
commit | 2a9ba2ee5f440dd6712ebcb5011e9f00309187c5 (patch) | |
tree | 57b2e9fdde57f9ace1a323fea9bf1221e2b42061 /drivers/char/hw_random | |
parent | 29589f06d2430efb76c227b0117029ebd3101eec (diff) |
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>
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/mxc-rnga.c | 6 | ||||
-rw-r--r-- | drivers/char/hw_random/omap-rng.c | 5 |
2 files changed, 0 insertions, 11 deletions
diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c index 4ca35e8a5d8c..19a12ac64a9e 100644 --- a/drivers/char/hw_random/mxc-rnga.c +++ b/drivers/char/hw_random/mxc-rnga.c | |||
@@ -167,11 +167,6 @@ static int __init mxc_rnga_probe(struct platform_device *pdev) | |||
167 | clk_prepare_enable(mxc_rng->clk); | 167 | clk_prepare_enable(mxc_rng->clk); |
168 | 168 | ||
169 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 169 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
170 | if (!res) { | ||
171 | err = -ENOENT; | ||
172 | goto err_region; | ||
173 | } | ||
174 | |||
175 | mxc_rng->mem = devm_ioremap_resource(&pdev->dev, res); | 170 | mxc_rng->mem = devm_ioremap_resource(&pdev->dev, res); |
176 | if (IS_ERR(mxc_rng->mem)) { | 171 | if (IS_ERR(mxc_rng->mem)) { |
177 | err = PTR_ERR(mxc_rng->mem); | 172 | err = PTR_ERR(mxc_rng->mem); |
@@ -189,7 +184,6 @@ static int __init mxc_rnga_probe(struct platform_device *pdev) | |||
189 | return 0; | 184 | return 0; |
190 | 185 | ||
191 | err_ioremap: | 186 | err_ioremap: |
192 | err_region: | ||
193 | clk_disable_unprepare(mxc_rng->clk); | 187 | clk_disable_unprepare(mxc_rng->clk); |
194 | 188 | ||
195 | out: | 189 | out: |
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index 749dc16ca2cc..d2903e772270 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c | |||
@@ -119,11 +119,6 @@ static int omap_rng_probe(struct platform_device *pdev) | |||
119 | dev_set_drvdata(&pdev->dev, priv); | 119 | dev_set_drvdata(&pdev->dev, priv); |
120 | 120 | ||
121 | priv->mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 121 | priv->mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
122 | if (!priv->mem_res) { | ||
123 | ret = -ENOENT; | ||
124 | goto err_ioremap; | ||
125 | } | ||
126 | |||
127 | priv->base = devm_ioremap_resource(&pdev->dev, priv->mem_res); | 122 | priv->base = devm_ioremap_resource(&pdev->dev, priv->mem_res); |
128 | if (IS_ERR(priv->base)) { | 123 | if (IS_ERR(priv->base)) { |
129 | ret = PTR_ERR(priv->base); | 124 | ret = PTR_ERR(priv->base); |