diff options
author | Hans de Goede <hdegoede@redhat.com> | 2022-12-23 01:00:48 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-02-08 09:55:38 +0300 |
commit | 3376f06932f85eda824597f6ef93fccbbb92b64f (patch) | |
tree | 7b4eac833aca6f01cefd95cd9906d126e4f1578a /drivers/staging/media/atomisp/pci/atomisp_fops.c | |
parent | 5b8c1d30dc358c07aa0ef7676c2ddc3787abcf86 (diff) | |
download | linux-3376f06932f85eda824597f6ef93fccbbb92b64f.tar.xz |
media: atomisp: Propagate set_fmt() errors in queue_setup()
If set_fmt() fails make queue_setup() actually return the error instead of
returning 0.
This fixes the following oops on set_fmt() failures:
[ 1060.378662] ------------[ cut here ]------------
[ 1060.378805] WARNING: CPU: 0 PID: 2080 at drivers/media/common/videobuf2/videobuf2-core.c:840 vb2_core_reqbufs+0x3f7/0x430 [videobuf2_common]
...
[ 1060.381414] RIP: 0010:vb2_core_reqbufs+0x3f7/0x430 [videobuf2_common]
...
[ 1060.382066] vb2_ioctl_reqbufs+0x9d/0xe0 [videobuf2_v4l2]
[ 1060.382181] __video_do_ioctl+0x18e/0x3c0 [videodev]
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp_fops.c')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_fops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c index acea7492847d..d953240cc908 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_fops.c +++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c @@ -80,7 +80,7 @@ static int atomisp_queue_setup(struct vb2_queue *vq, out: mutex_unlock(&pipe->asd->isp->mutex); - return 0; + return ret; } static int atomisp_buf_init(struct vb2_buffer *vb) |