media: media/pci: Fix memleak in empress_init
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Sat, 2 Jan 2021 06:27:22 +0000 (07:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:37:40 +0000 (11:37 +0100)
commit172e30ea386178506c749ad7b99d9e38cf722588
tree80b675579bad833f76117b4a1e8c21ec78196557
parent451c7cb236ef4a1223583b68831211c2c59da3b9
media: media/pci: Fix memleak in empress_init

[ Upstream commit 15d0c52241ecb1c9d802506bff6f5c3f7872c0df ]

When vb2_queue_init() fails, dev->empress_dev
should be released just like other error handling
paths.

Fixes: 2ada815fc48bb ("[media] saa7134: convert to vb2")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/pci/saa7134/saa7134-empress.c