From: Mauro Carvalho Chehab Date: Mon, 29 Dec 2008 22:02:24 +0000 (-0300) Subject: V4L/DVB (10109): anysee: Fix usage of an unitialized function X-Git-Tag: v2.6.29-rc1~556^2~16 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=902571aaa91263bc27e923e94ddf161c106befee;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c index cd2edbcaa09..5017f08b14a 100644 --- a/drivers/media/dvb/dvb-usb/anysee.c +++ b/drivers/media/dvb/dvb-usb/anysee.c @@ -153,7 +153,7 @@ static int anysee_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num) { struct dvb_usb_device *d = i2c_get_adapdata(adap); - int ret, inc, i = 0; + int ret = 0, inc, i = 0; if (mutex_lock_interruptible(&d->i2c_mutex) < 0) return -EAGAIN;