media: mx2_emmaprp: Fix memleak in emmaprp_probe
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Wed, 26 Aug 2020 09:26:04 +0000 (11:26 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 26 Sep 2020 08:15:39 +0000 (10:15 +0200)
commit21d387b8d372f859d9e87fdcc7c3b4a432737f4d
tree5346b26de46e1fe3742032ce85721001e069ca8f
parent057e212eae72f8a2741310fa03f1f522cfe36187
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: d4e192cc44914 ("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>
drivers/media/platform/mx2_emmaprp.c