diff options
Diffstat (limited to 'drivers/mtd/devices/spear_smi.c')
-rw-r--r-- | drivers/mtd/devices/spear_smi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index 2aabd96bf0ff..8a82b8bc21e1 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c | |||
@@ -949,10 +949,9 @@ static int spear_smi_probe(struct platform_device *pdev) | |||
949 | 949 | ||
950 | smi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 950 | smi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
951 | 951 | ||
952 | dev->io_base = devm_request_and_ioremap(&pdev->dev, smi_base); | 952 | dev->io_base = devm_ioremap_resource(&pdev->dev, smi_base); |
953 | if (!dev->io_base) { | 953 | if (IS_ERR(dev->io_base)) { |
954 | ret = -EIO; | 954 | ret = PTR_ERR(dev->io_base); |
955 | dev_err(&pdev->dev, "devm_request_and_ioremap fail\n"); | ||
956 | goto err; | 955 | goto err; |
957 | } | 956 | } |
958 | 957 | ||