mirror of
https://github.com/torvalds/linux.git
synced 2024-12-30 06:41:43 +00:00
media: vivid: fix error path
If something fails after calling v4l2_device_register(), it should call v4l2_device_put(). Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
62c6b4c9e3
commit
49a3d74b46
@ -1698,10 +1698,8 @@ static int vivid_create_instance(struct platform_device *pdev, int inst)
|
||||
&has_tuner, &has_modulator,
|
||||
&ccs_cap, &ccs_out,
|
||||
in_type_counter, out_type_counter);
|
||||
if (ret) {
|
||||
kfree(dev);
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
goto free_dev;
|
||||
|
||||
vivid_set_capabilities(dev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user