diff mbox

i2c: nomadik: Don't use IS_ERR for devm_ioremap

Message ID 1397139569-3906-1-git-send-email-ulf.hansson@linaro.org
State Accepted
Commit 37e5eb0bae7bb4d98c2153c3c3400b5c00c3cad1
Headers show

Commit Message

Ulf Hansson April 10, 2014, 2:19 p.m. UTC
devm_ioremap() returns NULL on error, not an error.

Cc: Alessandro Rubini <rubini@unipv.it>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/i2c/busses/i2c-nomadik.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ulf Hansson May 6, 2014, 9:32 a.m. UTC | #1
On 10 April 2014 16:19, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> devm_ioremap() returns NULL on error, not an error.
>
> Cc: Alessandro Rubini <rubini@unipv.it>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Linus, Wolfram - ping.

Kind regards
Ulf Hansson
Linus Walleij May 6, 2014, 6:48 p.m. UTC | #2
On Tue, May 6, 2014 at 11:32 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> On 10 April 2014 16:19, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> devm_ioremap() returns NULL on error, not an error.
>>
>> Cc: Alessandro Rubini <rubini@unipv.it>
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>
> Linus, Wolfram - ping.

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang May 14, 2014, 3:57 p.m. UTC | #3
On Thu, Apr 10, 2014 at 04:19:29PM +0200, Ulf Hansson wrote:
> devm_ioremap() returns NULL on error, not an error.
> 
> Cc: Alessandro Rubini <rubini@unipv.it>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Applied to for-current, thanks!
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index 28cbe1b..32c85e9 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -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,
 				resource_size(&adev->res));
-	if (IS_ERR(dev->virtbase)) {
+	if (!dev->virtbase) {
 		ret = -ENOMEM;
 		goto err_no_mem;
 	}