Commit 37e5eb0b authored by Ulf Hansson's avatar Ulf Hansson Committed by Wolfram Sang

i2c: nomadik: Don't use IS_ERR for devm_ioremap

devm_ioremap() returns NULL on error, not an error.
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
parent 47bb27e7
...@@ -999,7 +999,7 @@ static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id) ...@@ -999,7 +999,7 @@ static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id)
dev->virtbase = devm_ioremap(&adev->dev, adev->res.start, dev->virtbase = devm_ioremap(&adev->dev, adev->res.start,
resource_size(&adev->res)); resource_size(&adev->res));
if (IS_ERR(dev->virtbase)) { if (!dev->virtbase) {
ret = -ENOMEM; ret = -ENOMEM;
goto err_no_mem; goto err_no_mem;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment