提交 798166db 编写于 作者: D David Ellingsworth 提交者: Mauro Carvalho Chehab

V4L/DVB (13073): radio-mr800: set radio frequency only upon success

Set radio frequency only upon success.
Signed-off-by: NDavid Ellingsworth <david@identd.dyndns.org>
Acked-by: NAlexey Klimov <klimov.linux@gmail.com>
Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 16a72f41
...@@ -235,6 +235,7 @@ static int amradio_setfreq(struct amradio_device *radio, int freq) ...@@ -235,6 +235,7 @@ static int amradio_setfreq(struct amradio_device *radio, int freq)
if (retval < 0 || size != BUFFER_LENGTH) if (retval < 0 || size != BUFFER_LENGTH)
goto out_err; goto out_err;
radio->curfreq = freq;
goto out; goto out;
out_err: out_err:
...@@ -371,13 +372,8 @@ static int vidioc_s_frequency(struct file *file, void *priv, ...@@ -371,13 +372,8 @@ static int vidioc_s_frequency(struct file *file, void *priv,
struct v4l2_frequency *f) struct v4l2_frequency *f)
{ {
struct amradio_device *radio = file->private_data; struct amradio_device *radio = file->private_data;
int retval = 0;
radio->curfreq = f->frequency;
retval = amradio_setfreq(radio, radio->curfreq); return amradio_setfreq(radio, f->frequency);
return retval;
} }
/* vidioc_g_frequency - get tuner radio frequency */ /* vidioc_g_frequency - get tuner radio frequency */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册