diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-rcar.c')
-rw-r--r-- | drivers/i2c/busses/i2c-rcar.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index 9bd4d73d29e3..4ba4a95b6b26 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c @@ -642,11 +642,9 @@ static int rcar_i2c_probe(struct platform_device *pdev) if (ret < 0) return ret; - priv->io = devm_request_and_ioremap(dev, res); - if (!priv->io) { - dev_err(dev, "cannot ioremap\n"); - return -ENODEV; - } + priv->io = devm_ioremap_resource(dev, res); + if (IS_ERR(priv->io)) + return PTR_ERR(priv->io); priv->irq = platform_get_irq(pdev, 0); init_waitqueue_head(&priv->wait); |