summaryrefslogtreecommitdiff
path: root/linux/drivers/media/radio
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-08-31 22:21:04 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2009-08-31 22:21:04 +0200
commit0d61095304d57762b4452311a5efa6b93ac9f62f (patch)
treeacb2f9f8f65007f98e4a2b21c357e929644fa9de /linux/drivers/media/radio
parent16f4313d433426d6be10c2cb34a73cc472dc025a (diff)
downloadmediapointer-dvb-s2-0d61095304d57762b4452311a5efa6b93ac9f62f.tar.gz
mediapointer-dvb-s2-0d61095304d57762b4452311a5efa6b93ac9f62f.tar.bz2
si4713: simplify the code to remove a compiler warning.
From: Hans Verkuil <hverkuil@xs4all.nl> The compiler warned about an uninitialized stereo variable. By simplifying the code it 1) improved readability and 2) fixed the compiler warning. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: Eduardo Valentin <eduardo.valentin@nokia.com>
Diffstat (limited to 'linux/drivers/media/radio')
-rw-r--r--linux/drivers/media/radio/si4713-i2c.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/linux/drivers/media/radio/si4713-i2c.c b/linux/drivers/media/radio/si4713-i2c.c
index 8cbbe48b0..6a0028eb4 100644
--- a/linux/drivers/media/radio/si4713-i2c.c
+++ b/linux/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;
}