]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] mtk-vcodec: remove redundant return value check of platform_get_resource()
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 7 Feb 2017 15:16:20 +0000 (13:16 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 22 Mar 2017 14:23:20 +0000 (11:23 -0300)
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 <weiyongjun1@huawei.com>
Acked-by: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c

index aa81f3ce94632575af2ee5cd212d8fd568088c99..83f859e8509c9e2ca3b16bc8d950bb93220152ac 100644 (file)
@@ -269,11 +269,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 
        for (i = VENC_SYS, j = 0; i < NUM_MAX_VCODEC_REG_BASE; i++, j++) {
                res = platform_get_resource(pdev, IORESOURCE_MEM, j);
-               if (res == NULL) {
-                       dev_err(&pdev->dev, "get memory resource failed.");
-                       ret = -ENXIO;
-                       goto err_res;
-               }
                dev->reg_base[i] = devm_ioremap_resource(&pdev->dev, res);
                if (IS_ERR((__force void *)dev->reg_base[i])) {
                        ret = PTR_ERR((__force void *)dev->reg_base[i]);