@@ -1888,10 +1888,6 @@ static int rcar_vin_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "pdata_flags = %08x\n", pdata_flags);
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (mem == NULL)
- return -EINVAL;
-
irq = platform_get_irq(pdev, 0);
if (irq <= 0)
return -EINVAL;
@@ -1901,6 +1897,7 @@ static int rcar_vin_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
+ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->base = devm_ioremap_resource(&pdev->dev, mem);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);