Commit 49a3d74b authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: vivid: fix error path

If something fails after calling v4l2_device_register(),
it should call v4l2_device_put().
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 62c6b4c9
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment