[10/17] media: mediatek: mdp3: replace return by goto for proper unwind
Commit Message
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
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
@@ -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;