aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-terratec.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/radio/radio-terratec.c')
-rw-r--r--drivers/media/radio/radio-terratec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-terratec.c b/drivers/media/radio/radio-terratec.c
index 699db9acaaf7..fc1c860fd438 100644
--- a/drivers/media/radio/radio-terratec.c
+++ b/drivers/media/radio/radio-terratec.c
@@ -240,6 +240,8 @@ static int vidioc_s_frequency(struct file *file, void *priv,
240{ 240{
241 struct terratec *tt = video_drvdata(file); 241 struct terratec *tt = video_drvdata(file);
242 242
243 if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO)
244 return -EINVAL;
243 tt_setfreq(tt, f->frequency); 245 tt_setfreq(tt, f->frequency);
244 return 0; 246 return 0;
245} 247}
@@ -249,6 +251,8 @@ static int vidioc_g_frequency(struct file *file, void *priv,
249{ 251{
250 struct terratec *tt = video_drvdata(file); 252 struct terratec *tt = video_drvdata(file);
251 253
254 if (f->tuner != 0)
255 return -EINVAL;
252 f->type = V4L2_TUNER_RADIO; 256 f->type = V4L2_TUNER_RADIO;
253 f->frequency = tt->curfreq; 257 f->frequency = tt->curfreq;
254 return 0; 258 return 0;