media: atomisp: Propagate set_fmt() errors in queue_setup()
authorHans de Goede <hdegoede@redhat.com>
Thu, 22 Dec 2022 22:00:48 +0000 (23:00 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 8 Feb 2023 06:55:38 +0000 (07:55 +0100)
commit3376f06932f85eda824597f6ef93fccbbb92b64f
tree7b4eac833aca6f01cefd95cd9906d126e4f1578a
parent5b8c1d30dc358c07aa0ef7676c2ddc3787abcf86
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>
drivers/staging/media/atomisp/pci/atomisp_fops.c