Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3876420a authored by Wei Yongjun's avatar Wei Yongjun Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarTiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent db0f4691
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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]);