From 33cef62634c7f0a4b54be792d7d1c4e1b807f4d9 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 29 Dec 2008 20:02:24 -0200 Subject: anysee: Fix usage of an unitialized function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Mauro Carvalho Chehab 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. Signed-off-by: Mauro Carvalho Chehab CC: Antti Palosaari --- linux/drivers/media/dvb/dvb-usb/anysee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/drivers/media/dvb/dvb-usb/anysee.c b/linux/drivers/media/dvb/dvb-usb/anysee.c index 90a04266a..1dbf132a7 100644 --- a/linux/drivers/media/dvb/dvb-usb/anysee.c +++ b/linux/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; -- cgit v1.2.3