Skip to content

Commit

Permalink
media: imx: capture: Return -EPIPE from __capture_legacy_try_fmt()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Rui Miguel Silva <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
pinchartl authored and mchehab committed Mar 11, 2021
1 parent 6cc2094 commit cc271b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/media/imx/imx-media-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ static int capture_validate_fmt(struct capture_priv *priv)
priv->vdev.fmt.height != pixfmt.height ||
priv->vdev.cc->cs != cc->cs ||
priv->vdev.compose.width != compose.width ||
priv->vdev.compose.height != compose.height) ? -EINVAL : 0;
priv->vdev.compose.height != compose.height) ? -EPIPE : 0;
}

static int capture_start_streaming(struct vb2_queue *vq, unsigned int count)
Expand Down

0 comments on commit cc271b6

Please sign in to comment.