Skip to content

Commit

Permalink
V4L/DVB (10109): anysee: Fix usage of an unitialized function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab committed Dec 30, 2008
1 parent ff92420 commit 902571a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb/dvb-usb/anysee.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 902571a

Please sign in to comment.