From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx> Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). And move those two call together to make the connection between them more clear. Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx> --- drivers/media/platform/soc_camera/rcar_vin.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 9c13752..bf52262 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -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); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html