Skip to content

Commit

Permalink
V4L/DVB (5258): Cafe_ccic: fix compiler warning
Browse files Browse the repository at this point in the history
Fix the following warning:
drivers/media/video/cafe_ccic.c: In function `cafe_vidioc_reqbufs':
drivers/media/video/cafe_ccic.c:1197: warning: 'ret' might be used uninitialized in this function
Probably not a real bug, but the warning can be avoided easily.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Jean Delvare authored and Mauro Carvalho Chehab committed Mar 1, 2007
1 parent 2fe22dc commit b9109b7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/media/video/cafe_ccic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ static ssize_t cafe_v4l_read(struct file *filp,
char __user *buffer, size_t len, loff_t *pos)
{
struct cafe_camera *cam = filp->private_data;
int ret;
int ret = 0;

/*
* Perhaps we're in speculative read mode and already
Expand Down Expand Up @@ -1251,8 +1251,6 @@ static int cafe_vidioc_reqbufs(struct file *filp, void *priv,

if (cam->n_sbufs == 0) /* no luck at all - ret already set */
kfree(cam->sb_bufs);
else
ret = 0;
req->count = cam->n_sbufs; /* In case of partial success */

out:
Expand Down

0 comments on commit b9109b7

Please sign in to comment.