diff options
author | Mike Isely <isely@pobox.com> | 2009-03-31 23:55:26 -0500 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2009-03-31 23:55:26 -0500 |
commit | f76de4701fca53bec40b9819de8de434a07716b6 (patch) | |
tree | 2dbff9a75562fb466cbe4280ea8136308ff36825 /linux/drivers/media/video | |
parent | 3082c825708d174b83fbcf67482d6e8acbb03d23 (diff) | |
download | mediapointer-dvb-s2-f76de4701fca53bec40b9819de8de434a07716b6.tar.gz mediapointer-dvb-s2-f76de4701fca53bec40b9819de8de434a07716b6.tar.bz2 |
pvrusb2: Fix uninitialized tuner_setup field(s)
From: Mike Isely <isely@pobox.com>
Any time a struct (especially one not defined by this driver) is
allocated, we MUST zero its underlying storage. This makes our usage
of the struct predictable and robust against future changes where
fields might be added that we don't know about. Failing to do this
with tuner_setup left the config field uninitialized which then caused
trouble with the tuner type used for HVR-1950 devices.
Priority: high
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index bea17cd64..def29ddb3 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -2948,6 +2948,7 @@ static void pvr2_subdev_update(struct pvr2_hdw *hdw) pvr2_trace(PVR2_TRACE_CHIPS, "subdev tuner set_type(%d)", hdw->tuner_type); if (((int)(hdw->tuner_type)) >= 0) { + memset(&setup, 0, sizeof(setup)); setup.addr = ADDR_UNSET; setup.type = hdw->tuner_type; setup.mode_mask = T_RADIO | T_ANALOG_TV; |