diff options
| author | Sakari Ailus <[email protected]> | 2024-12-16 08:48:49 +0000 |
|---|---|---|
| committer | Hans Verkuil <[email protected]> | 2025-02-15 14:22:54 +0000 |
| commit | 91d6a99acfa5ce9f95ede775074b80f7193bd717 (patch) | |
| tree | bd3f0a8618822b48ebd229ceaad04632589250ee /drivers/media/v4l2-core/v4l2-subdev.c | |
| parent | media: Documentation: Receiver drivers should call v4l2_get_link_freq() (diff) | |
| download | kernel-91d6a99acfa5ce9f95ede775074b80f7193bd717.tar.gz kernel-91d6a99acfa5ce9f95ede775074b80f7193bd717.zip | |
media: v4l: Memset argument to 0 before calling get_mbus_config pad op
Memset the config argument to get_mbus_config V4L2 sub-device pad
operation to zero before calling the operation. This ensures the callers
don't need to bother with it nor the implementations need to set all
fields that may not be relevant to them.
Signed-off-by: Sakari Ailus <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-subdev.c')
| -rw-r--r-- | drivers/media/v4l2-core/v4l2-subdev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index cde1774c9098..a3074f469b15 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -444,6 +444,8 @@ static int call_enum_dv_timings(struct v4l2_subdev *sd, static int call_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_mbus_config *config) { + memset(config, 0, sizeof(*config)); + return check_pad(sd, pad) ? : sd->ops->pad->get_mbus_config(sd, pad, config); } |
