Skip to content

Commit 9558211

Browse files
committed
media: saa6752hs: Don't set format in sub-device state
jira LE-3428 Rebuild_History Non-Buildable kernel-5.14.0-570.23.1.el9_6 commit-author Sakari Ailus <[email protected]> commit c692696 Empty-Commit: Cherry-Pick Conflicts during history rebuild. Will be included in final tarball splat. Ref for failed cherry-pick at: ciq/ciq_backports/kernel-5.14.0-570.23.1.el9_6/c692696f.failed 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 <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> (cherry picked from commit c692696) Signed-off-by: Jonathan Maple <[email protected]> # Conflicts: # drivers/media/i2c/saa6752hs.c
1 parent 4782928 commit 9558211

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
media: saa6752hs: Don't set format in sub-device state
2+
3+
jira LE-3428
4+
Rebuild_History Non-Buildable kernel-5.14.0-570.23.1.el9_6
5+
commit-author Sakari Ailus <[email protected]>
6+
commit c692696fc51c5acee555b94d391d328510b557c8
7+
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
8+
Will be included in final tarball splat. Ref for failed cherry-pick at:
9+
ciq/ciq_backports/kernel-5.14.0-570.23.1.el9_6/c692696f.failed
10+
11+
For the purpose of setting old non-pad based sub-device try format as a
12+
basis for VIDIOC_TRY_FMT implementation, there is no need to set the
13+
format in the sub-device state. Drop the assignment to the state, which
14+
would result in a NULL pointer dereference.
15+
16+
Fixes: fd17e3a9a788 ("media: i2c: Use accessors for pad config 'try_*' fields")
17+
Signed-off-by: Sakari Ailus <[email protected]>
18+
Reviewed-by: Laurent Pinchart <[email protected]>
19+
Signed-off-by: Hans Verkuil <[email protected]>
20+
(cherry picked from commit c692696fc51c5acee555b94d391d328510b557c8)
21+
Signed-off-by: Jonathan Maple <[email protected]>
22+
23+
# Conflicts:
24+
# drivers/media/i2c/saa6752hs.c
25+
diff --cc drivers/media/i2c/saa6752hs.c
26+
index a7f043cad149,897eaa669b86..000000000000
27+
--- a/drivers/media/i2c/saa6752hs.c
28+
+++ b/drivers/media/i2c/saa6752hs.c
29+
@@@ -594,10 -594,8 +594,13 @@@ static int saa6752hs_set_fmt(struct v4l
30+
f->field = V4L2_FIELD_INTERLACED;
31+
f->colorspace = V4L2_COLORSPACE_SMPTE170M;
32+
33+
++<<<<<<< HEAD
34+
+ if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
35+
+ sd_state->pads->try_fmt = *f;
36+
++=======
37+
+ if (format->which == V4L2_SUBDEV_FORMAT_TRY)
38+
++>>>>>>> c692696fc51c (media: saa6752hs: Don't set format in sub-device state)
39+
return 0;
40+
- }
41+
42+
/*
43+
FIXME: translate and round width/height into EMPRESS
44+
* Unmerged path drivers/media/i2c/saa6752hs.c

0 commit comments

Comments
 (0)