summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-imx.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2013-05-10 10:16:54 +0200
committerWolfram Sang <wsa@the-dreams.de>2013-06-12 20:39:06 +0200
commit3cc2d009bc210516c61536273b304c4f6ccd797c (patch)
treeeb1dd301fbc62b9d33a027eb4e9c9f19dfacab81 /drivers/i2c/busses/i2c-imx.c
parente42dba569fceca5d59a88571370785e9ce9775b8 (diff)
drivers/i2c/busses: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-imx.c')
-rw-r--r--drivers/i2c/busses/i2c-imx.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 8c7526ca912e..6406aa960f2a 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -498,17 +498,13 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "<%s>\n", __func__);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "can't get device resources\n");
- return -ENOENT;
- }
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
dev_err(&pdev->dev, "can't get irq number\n");
return -ENOENT;
}
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))
return PTR_ERR(base);