Commit 902571aaa91263bc27e923e94ddf161c106befee

Authored by Mauro Carvalho Chehab
1 parent ff924203c9

V4L/DVB (10109): anysee: Fix usage of an unitialized function

drivers/media/dvb/dvb-usb/anysee.c: In function ‘anysee_master_xfer’:
drivers/media/dvb/dvb-usb/anysee.c:156: warning: ‘ret’ may be used uninitialized

By looking at the function, altrough very unlikely, this might
eventually be true if num  = 0. So, better to fix the warning by
initializing with ret = 0.

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/media/dvb/dvb-usb/anysee.c
... ... @@ -153,7 +153,7 @@
153 153 int num)
154 154 {
155 155 struct dvb_usb_device *d = i2c_get_adapdata(adap);
156   - int ret, inc, i = 0;
  156 + int ret = 0, inc, i = 0;
157 157  
158 158 if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
159 159 return -EAGAIN;