Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Wei Yongjun and committed by
Mauro Carvalho Chehab
3876420a db0f4691

-5
-5
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
··· 269 269 270 270 for (i = VENC_SYS, j = 0; i < NUM_MAX_VCODEC_REG_BASE; i++, j++) { 271 271 res = platform_get_resource(pdev, IORESOURCE_MEM, j); 272 - if (res == NULL) { 273 - dev_err(&pdev->dev, "get memory resource failed."); 274 - ret = -ENXIO; 275 - goto err_res; 276 - } 277 272 dev->reg_base[i] = devm_ioremap_resource(&pdev->dev, res); 278 273 if (IS_ERR((__force void *)dev->reg_base[i])) { 279 274 ret = PTR_ERR((__force void *)dev->reg_base[i]);