diff options
Diffstat (limited to 'drivers/media/radio/radio-rtrack2.c')
-rw-r--r-- | drivers/media/radio/radio-rtrack2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-rtrack2.c b/drivers/media/radio/radio-rtrack2.c index 9cb193fa6e33..a79296aac9a9 100644 --- a/drivers/media/radio/radio-rtrack2.c +++ b/drivers/media/radio/radio-rtrack2.c | |||
@@ -167,6 +167,8 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
167 | { | 167 | { |
168 | struct rtrack2 *rt = video_drvdata(file); | 168 | struct rtrack2 *rt = video_drvdata(file); |
169 | 169 | ||
170 | if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO) | ||
171 | return -EINVAL; | ||
170 | rt_setfreq(rt, f->frequency); | 172 | rt_setfreq(rt, f->frequency); |
171 | return 0; | 173 | return 0; |
172 | } | 174 | } |
@@ -176,6 +178,8 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
176 | { | 178 | { |
177 | struct rtrack2 *rt = video_drvdata(file); | 179 | struct rtrack2 *rt = video_drvdata(file); |
178 | 180 | ||
181 | if (f->tuner != 0) | ||
182 | return -EINVAL; | ||
179 | f->type = V4L2_TUNER_RADIO; | 183 | f->type = V4L2_TUNER_RADIO; |
180 | f->frequency = rt->curfreq; | 184 | f->frequency = rt->curfreq; |
181 | return 0; | 185 | return 0; |