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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}