diff options
author | 2017-02-07 13:16:20 -0200 | |
---|---|---|
committer | 2017-03-22 11:23:20 -0300 | |
commit | 3876420a88807e7d21057920d571ca9daf5fa615 (patch) | |
tree | 00580f9f9e7152f328eb3115a0a208ce57a1f8c8 /drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | |
parent | [media] v4l: Allow calling v4l2_device_register_subdev_nodes() multiple times (diff) | |
download | linux-3876420a88807e7d21057920d571ca9daf5fa615.tar.gz linux-3876420a88807e7d21057920d571ca9daf5fa615.tar.bz2 linux-3876420a88807e7d21057920d571ca9daf5fa615.zip |
[media] mtk-vcodec: 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 <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>
Diffstat (limited to 'drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c')
-rw-r--r-- | drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c index aa81f3ce9463..83f859e8509c 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c @@ -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]); |