Skip to content

Commit 9e915aa

Browse files
author
Kate Hsuan
committed
media: saa6752hs: Don't set format in sub-device state
JIRA: https://issues.redhat.com/browse/RHEL-86821 commit c692696 Author: Sakari Ailus <sakari.ailus@linux.intel.com> Date: Wed Dec 6 13:35:33 2023 +0200 For the purpose of setting old non-pad based sub-device try format as a basis for VIDIOC_TRY_FMT implementation, there is no need to set the format in the sub-device state. Drop the assignment to the state, which would result in a NULL pointer dereference. Fixes: fd17e3a ("media: i2c: Use accessors for pad config 'try_*' fields") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Kate Hsuan <hpa@redhat.com>
1 parent c38f332 commit 9e915aa

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/media/i2c/saa6752hs.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,8 @@ static int saa6752hs_set_fmt(struct v4l2_subdev *sd,
594594
f->field = V4L2_FIELD_INTERLACED;
595595
f->colorspace = V4L2_COLORSPACE_SMPTE170M;
596596

597-
if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
598-
*v4l2_subdev_get_pad_format(sd, sd_state, 0) = *f;
597+
if (format->which == V4L2_SUBDEV_FORMAT_TRY)
599598
return 0;
600-
}
601599

602600
/*
603601
FIXME: translate and round width/height into EMPRESS

0 commit comments

Comments
 (0)