Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9109b75 authored by Jean Delvare's avatar Jean Delvare Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (5258): Cafe_ccic: fix compiler warning



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: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 2fe22dcd
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -1022,7 +1022,7 @@ static ssize_t cafe_v4l_read(struct file *filp,
		char __user *buffer, size_t len, loff_t *pos)
		char __user *buffer, size_t len, loff_t *pos)
{
{
	struct cafe_camera *cam = filp->private_data;
	struct cafe_camera *cam = filp->private_data;
	int ret;
	int ret = 0;


	/*
	/*
	 * Perhaps we're in speculative read mode and already
	 * Perhaps we're in speculative read mode and already
@@ -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 */
	if (cam->n_sbufs == 0)  /* no luck at all - ret already set */
		kfree(cam->sb_bufs);
		kfree(cam->sb_bufs);
	else
		ret = 0;
	req->count = cam->n_sbufs;  /* In case of partial success */
	req->count = cam->n_sbufs;  /* In case of partial success */


  out:
  out: