media: v4l: subdev: v4l2_subdev_state_get_format always returns format now

Now that v4l2_subdev_state_get_format() always returns format, don't call
alternative v4l2_subdev_get_pad_format() anymore.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
Sakari Ailus 2023-10-13 10:54:24 +02:00 committed by Mauro Carvalho Chehab
parent d0fde6aae2
commit 8824170e95
1 changed files with 1 additions and 8 deletions

View File

@ -1587,14 +1587,7 @@ int v4l2_subdev_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_state *state,
{
struct v4l2_mbus_framefmt *fmt;
if (sd->flags & V4L2_SUBDEV_FL_STREAMS)
fmt = v4l2_subdev_state_get_format(state, format->pad,
format->stream);
else if (format->pad < sd->entity.num_pads && format->stream == 0)
fmt = v4l2_subdev_get_pad_format(sd, state, format->pad);
else
fmt = NULL;
fmt = v4l2_subdev_state_get_format(state, format->pad, format->stream);
if (!fmt)
return -EINVAL;