diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-08-31 16:21:04 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:19:50 -0400 |
commit | a65f3159244f27ce6ff84dd1bb641079acdbd396 (patch) | |
tree | f107a72a8223d3ae8f793e2bd6df371a02fd4bf0 /drivers/media/radio/si4713-i2c.c | |
parent | a4c1cbc7819e890d4c2bc2b79b6cbf0fd9cad699 (diff) |
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/radio/si4713-i2c.c')
-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 8cbbe48b01bd..6a0028eb461f 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) | |||
1841 | u16 stereo, rds; | 1841 | u16 stereo, rds; |
1842 | u32 p; | 1842 | u32 p; |
1843 | 1843 | ||
1844 | if (!sdev) { | 1844 | if (!sdev) |
1845 | rval = -ENODEV; | 1845 | return -ENODEV; |
1846 | goto exit; | ||
1847 | } | ||
1848 | 1846 | ||
1849 | if (vm->index > 0) { | 1847 | if (vm->index > 0) |
1850 | rval = -EINVAL; | 1848 | return -EINVAL; |
1851 | goto exit; | ||
1852 | } | ||
1853 | 1849 | ||
1854 | /* Set audio mode: mono or stereo */ | 1850 | /* Set audio mode: mono or stereo */ |
1855 | if (vm->txsubchans & V4L2_TUNER_SUB_STEREO) | 1851 | if (vm->txsubchans & V4L2_TUNER_SUB_STEREO) |
@@ -1857,9 +1853,7 @@ static int si4713_s_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm) | |||
1857 | else if (vm->txsubchans & V4L2_TUNER_SUB_MONO) | 1853 | else if (vm->txsubchans & V4L2_TUNER_SUB_MONO) |
1858 | stereo = 0; | 1854 | stereo = 0; |
1859 | else | 1855 | else |
1860 | rval = -EINVAL; | 1856 | return -EINVAL; |
1861 | if (rval < 0) | ||
1862 | goto exit; | ||
1863 | 1857 | ||
1864 | rds = !!(vm->txsubchans & V4L2_TUNER_SUB_RDS); | 1858 | rds = !!(vm->txsubchans & V4L2_TUNER_SUB_RDS); |
1865 | 1859 | ||
@@ -1885,7 +1879,6 @@ static int si4713_s_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm) | |||
1885 | 1879 | ||
1886 | unlock: | 1880 | unlock: |
1887 | mutex_unlock(&sdev->mutex); | 1881 | mutex_unlock(&sdev->mutex); |
1888 | exit: | ||
1889 | return rval; | 1882 | return rval; |
1890 | } | 1883 | } |
1891 | 1884 | ||