mtk-vcodec: remove redundant return value check of platform_get_resource()
Subsystems (2)
PATCH 1/1 mtk-vcodec: remove redundant return value check of platform_get_resource()
From: Wei Yongjun <[email protected]>
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 <[email protected]>
--- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c +0 -5
@@ -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]);
PATCH 1/1 mtk-vcodec: remove redundant return value check of platform_get_resource()
Quoted 7 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Remove unneeded error handling on the result of a call to
platform_get_resource()when the value is passed todevm_ioremap_resource().Signed-off-by Wei Yongjun <[email protected]>
Acked-by Tiffany Lin <[email protected]>
Quoted 23 lines
--- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 5 ----- 1 file changed, 5 deletions(-)drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c +0
-5@@ -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]);