mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-12 15:16:25 +07:00
media: mx2_emmaprp: Fix memleak in emmaprp_probe
When platform_get_irq() fails, we should release
vfd and unregister pcdev->v4l2_dev just like the
subsequent error paths.
Fixes: d4e192cc44
("media: mx2_emmaprp: Check for platform_get_irq() error")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
057e212eae
commit
21d387b8d3
@ -852,8 +852,11 @@ static int emmaprp_probe(struct platform_device *pdev)
|
|||||||
platform_set_drvdata(pdev, pcdev);
|
platform_set_drvdata(pdev, pcdev);
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0)
|
if (irq < 0) {
|
||||||
return irq;
|
ret = irq;
|
||||||
|
goto rel_vdev;
|
||||||
|
}
|
||||||
|
|
||||||
ret = devm_request_irq(&pdev->dev, irq, emmaprp_irq, 0,
|
ret = devm_request_irq(&pdev->dev, irq, emmaprp_irq, 0,
|
||||||
dev_name(&pdev->dev), pcdev);
|
dev_name(&pdev->dev), pcdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
Loading…
Reference in New Issue
Block a user