diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-09-21 22:39:44 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-10-05 09:39:03 +0200 |
commit | 21001fdb7dfa4a94b9ee76a9038ad16388d98f32 (patch) | |
tree | b8c3fd95c7b3ca7d12adaff42dca3b24e906cd6c /drivers/media/test-drivers | |
parent | media: hantro: Constify static struct v4l2_m2m_ops (diff) | |
download | linux-21001fdb7dfa4a94b9ee76a9038ad16388d98f32.tar.xz linux-21001fdb7dfa4a94b9ee76a9038ad16388d98f32.zip |
media: vivid: fix an error code in vivid_create_instance()
Preserve the error code stored in "dev->kthread_cec" before setting it
to NULL.
Fixes: 439e520995ab ("media: vivid: add signal-free time for cec message xfer")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/test-drivers')
-rw-r--r-- | drivers/media/test-drivers/vivid/vivid-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/test-drivers/vivid/vivid-core.c b/drivers/media/test-drivers/vivid/vivid-core.c index bcf03bea1e3c..04b75666bad4 100644 --- a/drivers/media/test-drivers/vivid/vivid-core.c +++ b/drivers/media/test-drivers/vivid/vivid-core.c @@ -1934,9 +1934,9 @@ static int vivid_create_instance(struct platform_device *pdev, int inst) dev->kthread_cec = kthread_run(vivid_cec_bus_thread, dev, "vivid_cec-%s", dev->v4l2_dev.name); if (IS_ERR(dev->kthread_cec)) { + ret = PTR_ERR(dev->kthread_cec); dev->kthread_cec = NULL; v4l2_err(&dev->v4l2_dev, "kernel_thread() failed\n"); - ret = PTR_ERR(dev->kthread_cec); goto unreg_dev; } } |