Skip to contentSkip to conversation

i2c: nomadik: Don't use IS_ERR for devm_ioremap

PATCH New Ulf Hansson 3 participants 4 messages Apr 10, 2014 – May 14, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: nomadik: Don't use IS_ERR for devm_ioremap

devm_ioremap() returns NULL on error, not an error.

Cc Alessandro Rubini <[email protected]>
Cc Linus Walleij <[email protected]>
---
 drivers/i2c/busses/i2c-nomadik.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-nomadik.c +1 -1
index 28cbe1b..32c85e9 100644
@@ -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;
 	}
Signature · 1 line
1.7.9.5
Applied
#3 lore raw

PATCH 1/1 i2c: nomadik: Don't use IS_ERR for devm_ioremap

In reply to Ulf Hansson
Quoted 5 lines · Ulf Hansson

devm_ioremap() returns NULL on error, not an error.

Cc Alessandro Rubini <[email protected]>
Cc Linus Walleij <[email protected]>

Applied to for-current, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140514/7cdedf9b/attachment.sig>