diff options
Diffstat (limited to 'drivers/media/radio/radio-aimslab.c')
-rw-r--r-- | drivers/media/radio/radio-aimslab.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c index 35edee009ba8..5bf4985daede 100644 --- a/drivers/media/radio/radio-aimslab.c +++ b/drivers/media/radio/radio-aimslab.c | |||
@@ -268,6 +268,8 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
268 | { | 268 | { |
269 | struct rtrack *rt = video_drvdata(file); | 269 | struct rtrack *rt = video_drvdata(file); |
270 | 270 | ||
271 | if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO) | ||
272 | return -EINVAL; | ||
271 | rt_setfreq(rt, f->frequency); | 273 | rt_setfreq(rt, f->frequency); |
272 | return 0; | 274 | return 0; |
273 | } | 275 | } |
@@ -277,6 +279,8 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
277 | { | 279 | { |
278 | struct rtrack *rt = video_drvdata(file); | 280 | struct rtrack *rt = video_drvdata(file); |
279 | 281 | ||
282 | if (f->tuner != 0) | ||
283 | return -EINVAL; | ||
280 | f->type = V4L2_TUNER_RADIO; | 284 | f->type = V4L2_TUNER_RADIO; |
281 | f->frequency = rt->curfreq; | 285 | f->frequency = rt->curfreq; |
282 | return 0; | 286 | return 0; |