diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:08:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 20:41:56 +0100 |
commit | c7c9e1c372452688f0ef2af794789bbd00f9fa51 (patch) | |
tree | 24f46d6b8a6393db716fda9fd94916c2faafd427 /drivers/char/hw_random/omap-rng.c | |
parent | lib: devres: Introduce devm_ioremap_resource() (diff) | |
download | linux-c7c9e1c372452688f0ef2af794789bbd00f9fa51.tar.xz linux-c7c9e1c372452688f0ef2af794789bbd00f9fa51.zip |
char: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/hw_random/omap-rng.c')
-rw-r--r-- | drivers/char/hw_random/omap-rng.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index d8c54e253761..749dc16ca2cc 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c @@ -124,9 +124,9 @@ static int omap_rng_probe(struct platform_device *pdev) goto err_ioremap; } - priv->base = devm_request_and_ioremap(&pdev->dev, priv->mem_res); - if (!priv->base) { - ret = -ENOMEM; + priv->base = devm_ioremap_resource(&pdev->dev, priv->mem_res); + if (IS_ERR(priv->base)) { + ret = PTR_ERR(priv->base); goto err_ioremap; } dev_set_drvdata(&pdev->dev, priv); |