Return constant integer values without storing them in the local
variable "err" or "rc".
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;
unsigned int i;
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;
unsigned int i;
for (i = 0; i < BTTV_TVNORMS; i++)
if (id & bttv_tvnorms[i].v4l2_id)
break;
for (i = 0; i < BTTV_TVNORMS; i++)
if (id & bttv_tvnorms[i].v4l2_id)
break;
- if (i == BTTV_TVNORMS) {
- err = -EINVAL;
- goto err;
- }
-
+ if (i == BTTV_TVNORMS)
+ return -EINVAL;
btv->std = id;
set_tvnorm(btv, i);
btv->std = id;
set_tvnorm(btv, i);
}
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)
{
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;
{
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;
- if (i->index >= bttv_tvcards[btv->c.type].video_inputs) {
- rc = -EINVAL;
- goto err;
- }
+ if (i->index >= bttv_tvcards[btv->c.type].video_inputs)
+ return -EINVAL;
i->type = V4L2_INPUT_TYPE_CAMERA;
i->audioset = 0;
i->type = V4L2_INPUT_TYPE_CAMERA;
i->audioset = 0;
}
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)