media: meson: vdec: fix possible refcount leak in vdec_probe()
authorHangyu Hua <hbh25y@gmail.com>
Tue, 6 Sep 2022 07:46:30 +0000 (09:46 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 06:55:43 +0000 (08:55 +0200)
commit7718999356234d9cc6a11b4641bb773928f1390f
treebb792b212c2840ba013700012e0d53f14a7fba69
parent594b6bdde2e7833a56413de5092b6e4188d33ff7
media: meson: vdec: fix possible refcount leak in vdec_probe()

v4l2_device_unregister need to be called to put the refcount got by
v4l2_device_register when vdec_probe fails or vdec_remove is called.

Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/meson/vdec/vdec.c