diff mbox series

[10/17] media: mediatek: mdp3: replace return by goto for proper unwind

Message ID 20230126150657.367921-11-hverkuil-cisco@xs4all.nl (mailing list archive)
State New, archived
Headers show
Series media: sparse/smatch fixes | expand

Commit Message

Hans Verkuil Jan. 26, 2023, 3:06 p.m. UTC
An error was returned at one point without going through the
goto label for proper unwinding.

This fixes a smatch warning:

mtk-mdp3-comp.c:1005 mdp_comp_config() warn: missing unwind goto?

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Moudy Ho <moudy.ho@mediatek.com>
---
 drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Mauro Carvalho Chehab Feb. 8, 2023, 7:38 a.m. UTC | #1
Em Thu, 26 Jan 2023 16:06:50 +0100
Hans Verkuil <hverkuil-cisco@xs4all.nl> escreveu:

> An error was returned at one point without going through the
> goto label for proper unwinding.
> 
> This fixes a smatch warning:
> 
> mtk-mdp3-comp.c:1005 mdp_comp_config() warn: missing unwind goto?

This patch doesn't apply, as the logic it is meant to touch
changed a lot. I'm simply discarding it from your PR.

Please work on a new version if still needed.

Regards,
Mauro

Thanks,
Mauro
diff mbox series

Patch

diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c
index 7bc05f42a23c..091a68685590 100644
--- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c
+++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c
@@ -1002,7 +1002,8 @@  int mdp_comp_config(struct mdp_dev *mdp)
 		if (!pdev) {
 			dev_warn(dev, "can't find platform device of node:%s\n",
 				 node->name);
-			return -ENODEV;
+			ret = -ENODEV;
+			goto err_init_comps;
 		}
 
 		comp->comp_dev = &pdev->dev;