mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
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>
This commit is contained in:
parent
16a72f41bb
commit
798166dbec
1 changed files with 2 additions and 6 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue