From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com,
Mauro Carvalho Chehab <mchehab@kernel.org>,
hverkuil@xs4all.nl
Subject: [PATCH 3/6] media: mt9t112: Don't set format in sub-device state
Date: Thu, 7 Dec 2023 14:09:09 +0200 [thread overview]
Message-ID: <20231207120912.270716-4-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20231207120912.270716-1-sakari.ailus@linux.intel.com>
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: fd17e3a9a788 ("media: i2c: Use accessors for pad config 'try_*' fields")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/i2c/mt9t112.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/i2c/mt9t112.c b/drivers/media/i2c/mt9t112.c
index 2e2d9853c089..fb1588c57cc8 100644
--- a/drivers/media/i2c/mt9t112.c
+++ b/drivers/media/i2c/mt9t112.c
@@ -982,7 +982,6 @@ static int mt9t112_set_fmt(struct v4l2_subdev *sd,
if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE)
return mt9t112_s_fmt(sd, mf);
- *v4l2_subdev_state_get_format(sd_state, 0) = *mf;
return 0;
}
--
2.39.2
next prev parent reply other threads:[~2023-12-07 12:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 12:09 [PATCH 0/6] Old non-MC-aware drivers have no sub-device state Sakari Ailus
2023-12-07 12:09 ` [PATCH 1/6] media: saa6752hs: Don't set format in " Sakari Ailus
2023-12-07 12:44 ` Laurent Pinchart
2023-12-07 12:09 ` [PATCH 2/6] media: adv7183: " Sakari Ailus
2023-12-07 12:44 ` Laurent Pinchart
2023-12-07 12:09 ` Sakari Ailus [this message]
2023-12-07 12:45 ` [PATCH 3/6] media: mt9t112: " Laurent Pinchart
2023-12-07 12:09 ` [PATCH 4/6] media: rj54n1cb0c: " Sakari Ailus
2023-12-07 12:45 ` Laurent Pinchart
2023-12-07 12:09 ` [PATCH 5/6] media: tw9910: " Sakari Ailus
2023-12-07 12:45 ` Laurent Pinchart
2023-12-07 12:09 ` [PATCH 6/6] media: ov9640: " Sakari Ailus
2023-12-07 12:46 ` Laurent Pinchart
2023-12-07 12:48 ` [PATCH 0/6] Old non-MC-aware drivers have no " Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231207120912.270716-4-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.