linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] [media] mtk-vcodec: remove redundant return value check of platform_get_resource()
@ 2017-02-07 15:16 Wei Yongjun
  2017-02-10  3:35 ` Tiffany Lin
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2017-02-07 15:16 UTC (permalink / raw)
  To: Tiffany Lin, Andrew-CT Chen, Mauro Carvalho Chehab,
	Matthias Brugger
  Cc: Wei Yongjun, linux-media, linux-arm-kernel, linux-mediatek

From: Wei Yongjun <weiyongjun1@huawei.com>

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>
---
 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 5 -----
 1 file changed, 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 aa81f3c..83f859e 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]);




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-10  3:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-07 15:16 [PATCH -next] [media] mtk-vcodec: remove redundant return value check of platform_get_resource() Wei Yongjun
2017-02-10  3:35 ` Tiffany Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).