From: Wei Yongjun Date: Tue, 12 Jul 2016 11:27:59 +0000 (-0300) Subject: [media] s5p-mfc: remove redundant return value check of platform_get_resource() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=05b72d439208f94ad2333d6323835f89890a3a9f;p=openwrt%2Fstaging%2Fblogic.git [media] s5p-mfc: remove redundant return value check of platform_get_resource() Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 43842dac530a..afa80be77f96 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1168,10 +1168,6 @@ static int s5p_mfc_probe(struct platform_device *pdev) dev->variant = mfc_get_drv_data(pdev); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) { - dev_err(&pdev->dev, "failed to get io resource\n"); - return -ENOENT; - } dev->regs_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(dev->regs_base)) return PTR_ERR(dev->regs_base);