aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2013-03-31 06:16:37 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-31 10:15:35 -0400
commitb0efc3ed0530b08e9e1cba5f63e9c251ca3d7428 (patch)
treebe2da07dd482f359c8a53ab593f10522d1ac55a7 /drivers/media/usb
parent46f85978687152c53a69fc06951e386f194e7f5d (diff)
[media] m920x: Fix uninitialized variable warning
drivers/media/usb/dvb-usb/m920x.c:91:6: warning: "ret" may be used uninitialized in this function [-Wuninitialized] drivers/media/usb/dvb-usb/m920x.c:70:6: note: "ret" was declared here This is real, if a remote control has an empty initialization sequence we would get success or failure randomly. OTOH the initialization of ret in m920x_init is needless, the function returns with an error as soon as an error happens, so the last return can only be a success and we can hard-code 0 there. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/dvb-usb/m920x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/usb/dvb-usb/m920x.c b/drivers/media/usb/dvb-usb/m920x.c
index 79b31ae66a9c..c2b635d6a17a 100644
--- a/drivers/media/usb/dvb-usb/m920x.c
+++ b/drivers/media/usb/dvb-usb/m920x.c
@@ -76,12 +76,12 @@ static inline int m920x_write_seq(struct usb_device *udev, u8 request,
76 seq++; 76 seq++;
77 } while (seq->address); 77 } while (seq->address);
78 78
79 return ret; 79 return 0;
80} 80}
81 81
82static int m920x_init(struct dvb_usb_device *d, struct m920x_inits *rc_seq) 82static int m920x_init(struct dvb_usb_device *d, struct m920x_inits *rc_seq)
83{ 83{
84 int ret = 0, i, epi, flags = 0; 84 int ret, i, epi, flags = 0;
85 int adap_enabled[M9206_MAX_ADAPTERS] = { 0 }; 85 int adap_enabled[M9206_MAX_ADAPTERS] = { 0 };
86 86
87 /* Remote controller init. */ 87 /* Remote controller init. */
@@ -124,7 +124,7 @@ static int m920x_init(struct dvb_usb_device *d, struct m920x_inits *rc_seq)
124 } 124 }
125 } 125 }
126 126
127 return ret; 127 return 0;
128} 128}
129 129
130static int m920x_init_ep(struct usb_interface *intf) 130static int m920x_init_ep(struct usb_interface *intf)