diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2019-10-08 06:01:33 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-10-10 07:22:54 -0300 |
commit | 1edfa9b1687ed8aac39a0423345f8a76a1cff58c (patch) | |
tree | 5a53c52120d32509049c79c5186bfcd08ba33dc1 | |
parent | 9e08117c9d4efc1e1bc6fce83dab856d9fd284b6 (diff) |
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: f13d5f361959 ("media: vimc: Collapse component structure into a single monolithic driver")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | drivers/media/platform/vimc/vimc-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/vimc/vimc-core.c b/drivers/media/platform/vimc/vimc-core.c index 6e3e5c91ae39..2d20a7c10398 100644 --- a/drivers/media/platform/vimc/vimc-core.c +++ b/drivers/media/platform/vimc/vimc-core.c @@ -202,8 +202,10 @@ static int vimc_register_devices(struct vimc_device *vimc) vimc->ent_devs = kmalloc_array(vimc->pipe_cfg->num_ents, sizeof(*vimc->ent_devs), GFP_KERNEL); - if (!vimc->ent_devs) + if (!vimc->ent_devs) { + ret = -ENOMEM; goto err_v4l2_unregister; + } /* Invoke entity config hooks to initialize and register subdevs */ ret = vimc_add_subdevs(vimc); |