aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2009-04-01 00:55:26 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 20:43:52 -0400
commitfcd62cf7f62a67976b72669934127cb4ecee2b1e (patch)
tree594819430901b6a86e0fbbdf4347c74bab666e8a /drivers
parent7bf56f94a15ac0655bfb259ce693ccab011b1363 (diff)
V4L/DVB (11334): pvrusb2: Fix uninitialized tuner_setup field(s)
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. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 7a65b42a4f53..cdd8b13a19ae 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -2926,6 +2926,7 @@ static void pvr2_subdev_update(struct pvr2_hdw *hdw)
2926 pvr2_trace(PVR2_TRACE_CHIPS, "subdev tuner set_type(%d)", 2926 pvr2_trace(PVR2_TRACE_CHIPS, "subdev tuner set_type(%d)",
2927 hdw->tuner_type); 2927 hdw->tuner_type);
2928 if (((int)(hdw->tuner_type)) >= 0) { 2928 if (((int)(hdw->tuner_type)) >= 0) {
2929 memset(&setup, 0, sizeof(setup));
2929 setup.addr = ADDR_UNSET; 2930 setup.addr = ADDR_UNSET;
2930 setup.type = hdw->tuner_type; 2931 setup.type = hdw->tuner_type;
2931 setup.mode_mask = T_RADIO | T_ANALOG_TV; 2932 setup.mode_mask = T_RADIO | T_ANALOG_TV;