Commit 490ba9c2 authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab

[media] bttv: Returning only value constants in two functions

Return constant integer values without storing them in the local
variable "err" or "rc".
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent b20b51f0
...@@ -1726,22 +1726,15 @@ static int bttv_s_std(struct file *file, void *priv, v4l2_std_id id) ...@@ -1726,22 +1726,15 @@ static int bttv_s_std(struct file *file, void *priv, v4l2_std_id id)
struct bttv_fh *fh = priv; struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv; struct bttv *btv = fh->btv;
unsigned int i; unsigned int i;
int err = 0;
for (i = 0; i < BTTV_TVNORMS; i++) for (i = 0; i < BTTV_TVNORMS; i++)
if (id & bttv_tvnorms[i].v4l2_id) if (id & bttv_tvnorms[i].v4l2_id)
break; break;
if (i == BTTV_TVNORMS) { if (i == BTTV_TVNORMS)
err = -EINVAL; return -EINVAL;
goto err;
}
btv->std = id; btv->std = id;
set_tvnorm(btv, i); set_tvnorm(btv, i);
return 0;
err:
return err;
} }
static int bttv_g_std(struct file *file, void *priv, v4l2_std_id *id) static int bttv_g_std(struct file *file, void *priv, v4l2_std_id *id)
...@@ -1770,12 +1763,9 @@ static int bttv_enum_input(struct file *file, void *priv, ...@@ -1770,12 +1763,9 @@ static int bttv_enum_input(struct file *file, void *priv,
{ {
struct bttv_fh *fh = priv; struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv; struct bttv *btv = fh->btv;
int rc = 0;
if (i->index >= bttv_tvcards[btv->c.type].video_inputs) { if (i->index >= bttv_tvcards[btv->c.type].video_inputs)
rc = -EINVAL; return -EINVAL;
goto err;
}
i->type = V4L2_INPUT_TYPE_CAMERA; i->type = V4L2_INPUT_TYPE_CAMERA;
i->audioset = 0; i->audioset = 0;
...@@ -1799,10 +1789,7 @@ static int bttv_enum_input(struct file *file, void *priv, ...@@ -1799,10 +1789,7 @@ static int bttv_enum_input(struct file *file, void *priv,
} }
i->std = BTTV_NORMS; i->std = BTTV_NORMS;
return 0;
err:
return rc;
} }
static int bttv_g_input(struct file *file, void *priv, unsigned int *i) static int bttv_g_input(struct file *file, void *priv, unsigned int *i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment