diff options
Diffstat (limited to 'drivers/media/radio/radio-aztech.c')
-rw-r--r-- | drivers/media/radio/radio-aztech.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c index 8daf809eb01a..c22311393624 100644 --- a/drivers/media/radio/radio-aztech.c +++ b/drivers/media/radio/radio-aztech.c | |||
@@ -254,6 +254,8 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
254 | { | 254 | { |
255 | struct aztech *az = video_drvdata(file); | 255 | struct aztech *az = video_drvdata(file); |
256 | 256 | ||
257 | if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO) | ||
258 | return -EINVAL; | ||
257 | az_setfreq(az, f->frequency); | 259 | az_setfreq(az, f->frequency); |
258 | return 0; | 260 | return 0; |
259 | } | 261 | } |
@@ -263,6 +265,8 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
263 | { | 265 | { |
264 | struct aztech *az = video_drvdata(file); | 266 | struct aztech *az = video_drvdata(file); |
265 | 267 | ||
268 | if (f->tuner != 0) | ||
269 | return -EINVAL; | ||
266 | f->type = V4L2_TUNER_RADIO; | 270 | f->type = V4L2_TUNER_RADIO; |
267 | f->frequency = az->curfreq; | 271 | f->frequency = az->curfreq; |
268 | return 0; | 272 | return 0; |