提交 a65f3159 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

V4L/DVB (12612): si4713: simplify the code to remove a compiler warning.

The compiler warned about an uninitialized stereo variable. By simplifying
the code it 1) improved readability and 2) fixed the compiler warning.
Acked-by: NEduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 a4c1cbc7
......@@ -1841,15 +1841,11 @@ static int si4713_s_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm)
u16 stereo, rds;
u32 p;
if (!sdev) {
rval = -ENODEV;
goto exit;
}
if (!sdev)
return -ENODEV;
if (vm->index > 0) {
rval = -EINVAL;
goto exit;
}
if (vm->index > 0)
return -EINVAL;
/* Set audio mode: mono or stereo */
if (vm->txsubchans & V4L2_TUNER_SUB_STEREO)
......@@ -1857,9 +1853,7 @@ static int si4713_s_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm)
else if (vm->txsubchans & V4L2_TUNER_SUB_MONO)
stereo = 0;
else
rval = -EINVAL;
if (rval < 0)
goto exit;
return -EINVAL;
rds = !!(vm->txsubchans & V4L2_TUNER_SUB_RDS);
......@@ -1885,7 +1879,6 @@ static int si4713_s_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm)
unlock:
mutex_unlock(&sdev->mutex);
exit:
return rval;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册