diff options
author | David Ellingsworth <david@identd.dyndns.org> | 2009-09-24 01:31:26 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 23:40:12 +0300 |
commit | 798166dbecafa98ec9b28d056774ec2fc80290df (patch) | |
tree | 0d15d7671a1ed671177b5211080cb72bd9c690d8 /drivers/media/radio/radio-mr800.c | |
parent | 16a72f41bb82573d7fe1dfea1cb8356dee307db4 (diff) | |
download | linux-798166dbecafa98ec9b28d056774ec2fc80290df.tar.xz |
V4L/DVB (13073): radio-mr800: set radio frequency only upon success
Set radio frequency only upon success.
Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/radio-mr800.c')
-rw-r--r-- | drivers/media/radio/radio-mr800.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index 5506fac5fd49..4064109c4205 100644 --- a/drivers/media/radio/radio-mr800.c +++ b/drivers/media/radio/radio-mr800.c @@ -235,6 +235,7 @@ static int amradio_setfreq(struct amradio_device *radio, int freq) if (retval < 0 || size != BUFFER_LENGTH) goto out_err; + radio->curfreq = freq; goto out; out_err: @@ -371,13 +372,8 @@ static int vidioc_s_frequency(struct file *file, void *priv, struct v4l2_frequency *f) { struct amradio_device *radio = file->private_data; - int retval = 0; - - radio->curfreq = f->frequency; - retval = amradio_setfreq(radio, radio->curfreq); - - return retval; + return amradio_setfreq(radio, f->frequency); } /* vidioc_g_frequency - get tuner radio frequency */ |