media: imx: capture: Return -EPIPE from __capture_legacy_try_fmt()
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 15 Feb 2021 04:26:47 +0000 (05:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 May 2021 12:47:24 +0000 (14:47 +0200)
commit12b4b2855024a700b7fdd26dc27f580cc230b92b
tree83534eb105ed7138b283bb8f6283dbd8c9fc77f9
parentf3dd6c47c4939d4945cbf8b05d642c7c9eca2e0d
media: imx: capture: Return -EPIPE from __capture_legacy_try_fmt()

[ Upstream commit cc271b6754691af74d710b761eaf027e3743e243 ]

The correct return code to report an invalid pipeline configuration is
-EPIPE. Return it instead of -EINVAL from __capture_legacy_try_fmt()
when the capture format doesn't match the media bus format of the
connected subdev.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/media/imx/imx-media-capture.c