[v3,2/2] media: imx-ic-prpencvf: Use empty initializer
Commit Message
From: Fabio Estevam <fabio.estevam@nxp.com>
{0} explicitly assigns 0 to the first member of the structure.
Even though the first member of the v4l2_subdev_format structure is of
_u32 type, make the initialization more robust by using the empty
initializer.
This way in case someday the struct is changed so that the first
member becomes a pointer, we will not have sparse warnings.
Reported-by: Steve Longerbeam <slongerbeam@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v1:
- Improve commit log
drivers/staging/media/imx/imx-ic-prpencvf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -923,7 +923,7 @@ static int prp_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_frame_size_enum *fse)
{
struct prp_priv *priv = sd_to_priv(sd);
- struct v4l2_subdev_format format = {0};
+ struct v4l2_subdev_format format = {};
const struct imx_media_pixfmt *cc;
int ret = 0;