diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-08-31 20:21:04 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 15:19:50 (GMT) |
commit | a65f3159244f27ce6ff84dd1bb641079acdbd396 (patch) | |
tree | f107a72a8223d3ae8f793e2bd6df371a02fd4bf0 /drivers/media | |
parent | a4c1cbc7819e890d4c2bc2b79b6cbf0fd9cad699 (diff) | |
download | linux-fsl-qoriq-a65f3159244f27ce6ff84dd1bb641079acdbd396.tar.xz |
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: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/radio/si4713-i2c.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/media/radio/si4713-i2c.c b/drivers/media/radio/si4713-i2c.c index 8cbbe48..6a0028e 100644 --- a/drivers/media/radio/si4713-i2c.c +++ b/drivers/media/radio/si4713-i2c.c @@ -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; } |