Skip to content

Commit c928d45

Browse files
maciejsszmigieromchehab
authored andcommitted
media: ivtv: zero-initialize cx25840 platform data
We need to zero-initialize cx25840 platform data structure to make sure that its future members do not contain random stack garbage. Signed-off-by: Maciej S. Szmigiero <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent d45c9dc commit c928d45

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/media/pci/ivtv/ivtv-i2c.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx)
293293
.platform_data = &pdata,
294294
};
295295

296+
memset(&pdata, 0, sizeof(pdata));
296297
pdata.pvr150_workaround = itv->pvr150_workaround;
297298
sd = v4l2_i2c_new_subdev_board(&itv->v4l2_dev, adap,
298299
&cx25840_info, NULL);

0 commit comments

Comments
 (0)