diff options
Diffstat (limited to 'drivers/media/radio/radio-gemtek-pci.c')
-rw-r--r-- | drivers/media/radio/radio-gemtek-pci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c index c6cf1166186..000f4d34087 100644 --- a/drivers/media/radio/radio-gemtek-pci.c +++ b/drivers/media/radio/radio-gemtek-pci.c | |||
@@ -240,6 +240,8 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
240 | { | 240 | { |
241 | struct gemtek_pci *card = video_drvdata(file); | 241 | struct gemtek_pci *card = video_drvdata(file); |
242 | 242 | ||
243 | if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO) | ||
244 | return -EINVAL; | ||
243 | if (f->frequency < GEMTEK_PCI_RANGE_LOW || | 245 | if (f->frequency < GEMTEK_PCI_RANGE_LOW || |
244 | f->frequency > GEMTEK_PCI_RANGE_HIGH) | 246 | f->frequency > GEMTEK_PCI_RANGE_HIGH) |
245 | return -EINVAL; | 247 | return -EINVAL; |
@@ -253,6 +255,8 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
253 | { | 255 | { |
254 | struct gemtek_pci *card = video_drvdata(file); | 256 | struct gemtek_pci *card = video_drvdata(file); |
255 | 257 | ||
258 | if (f->tuner != 0) | ||
259 | return -EINVAL; | ||
256 | f->type = V4L2_TUNER_RADIO; | 260 | f->type = V4L2_TUNER_RADIO; |
257 | f->frequency = card->current_frequency; | 261 | f->frequency = card->current_frequency; |
258 | return 0; | 262 | return 0; |