diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 10:09:19 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 19:41:57 (GMT) |
commit | 97f4be60178fec663baaa30a09ae102fd33373c2 (patch) | |
tree | 672ee4161bc389ec4840c413e4609ee779edba84 /drivers/staging/nvec/nvec.c | |
parent | 8cbce1e5f00ec68ee1c99f57db98c892db227629 (diff) | |
download | linux-97f4be60178fec663baaa30a09ae102fd33373c2.tar.xz |
staging: 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.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/nvec/nvec.c')
-rw-r--r-- | drivers/staging/nvec/nvec.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 2830946..492e0b6 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -759,11 +759,9 @@ static int tegra_nvec_probe(struct platform_device *pdev) return -ENODEV; } - base = devm_request_and_ioremap(&pdev->dev, res); - if (!base) { - dev_err(&pdev->dev, "Can't ioremap I2C region\n"); - return -ENOMEM; - } + base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(base)) + return PTR_ERR(base); res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!res) { |