diff options
Diffstat (limited to 'drivers/media/radio/radio-trust.c')
-rw-r--r-- | drivers/media/radio/radio-trust.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-trust.c b/drivers/media/radio/radio-trust.c index 6f9ecc359356..9d6dcf8af5b0 100644 --- a/drivers/media/radio/radio-trust.c +++ b/drivers/media/radio/radio-trust.c | |||
@@ -239,6 +239,8 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
239 | { | 239 | { |
240 | struct trust *tr = video_drvdata(file); | 240 | struct trust *tr = video_drvdata(file); |
241 | 241 | ||
242 | if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO) | ||
243 | return -EINVAL; | ||
242 | tr_setfreq(tr, f->frequency); | 244 | tr_setfreq(tr, f->frequency); |
243 | return 0; | 245 | return 0; |
244 | } | 246 | } |
@@ -248,6 +250,8 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
248 | { | 250 | { |
249 | struct trust *tr = video_drvdata(file); | 251 | struct trust *tr = video_drvdata(file); |
250 | 252 | ||
253 | if (f->tuner != 0) | ||
254 | return -EINVAL; | ||
251 | f->type = V4L2_TUNER_RADIO; | 255 | f->type = V4L2_TUNER_RADIO; |
252 | f->frequency = tr->curfreq; | 256 | f->frequency = tr->curfreq; |
253 | return 0; | 257 | return 0; |