Commit 1edfa9b1 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mauro Carvalho Chehab

media: vimc: Fix error return code in vimc_register_devices()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: f13d5f36 ("media: vimc: Collapse component structure into a single monolithic driver")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarHelen Koike <helen.koike@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 9e08117c
...@@ -202,8 +202,10 @@ static int vimc_register_devices(struct vimc_device *vimc) ...@@ -202,8 +202,10 @@ static int vimc_register_devices(struct vimc_device *vimc)
vimc->ent_devs = kmalloc_array(vimc->pipe_cfg->num_ents, vimc->ent_devs = kmalloc_array(vimc->pipe_cfg->num_ents,
sizeof(*vimc->ent_devs), sizeof(*vimc->ent_devs),
GFP_KERNEL); GFP_KERNEL);
if (!vimc->ent_devs) if (!vimc->ent_devs) {
ret = -ENOMEM;
goto err_v4l2_unregister; goto err_v4l2_unregister;
}
/* Invoke entity config hooks to initialize and register subdevs */ /* Invoke entity config hooks to initialize and register subdevs */
ret = vimc_add_subdevs(vimc); ret = vimc_add_subdevs(vimc);
......
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