diff options
author | Alexey Klimov <klimov.linux@gmail.com> | 2008-10-20 00:00:03 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-21 14:29:29 -0200 |
commit | b9f3573731e63116712eb5ea28bd6ded09232afa (patch) | |
tree | caa2c91768b7e93030a6db8a5dc0a2228954c268 /drivers/media/radio | |
parent | 0fabb78332aee7d5dd4a0a31228b9266de71182f (diff) | |
download | op-kernel-dev-b9f3573731e63116712eb5ea28bd6ded09232afa.zip op-kernel-dev-b9f3573731e63116712eb5ea28bd6ded09232afa.tar.gz |
V4L/DVB (9306): dsbr100: Add frequency check
Add checking for frequency and printk if -1 returned.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r-- | drivers/media/radio/dsbr100.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c index e88c58e..a5ca176 100644 --- a/drivers/media/radio/dsbr100.c +++ b/drivers/media/radio/dsbr100.c @@ -411,6 +411,7 @@ static int vidioc_s_audio(struct file *file, void *priv, static int usb_dsbr100_open(struct inode *inode, struct file *file) { struct dsbr100_device *radio = video_drvdata(file); + int retval; lock_kernel(); radio->users = 1; @@ -423,7 +424,12 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file) unlock_kernel(); return -EIO; } - dsbr100_setfreq(radio, radio->curfreq); + + retval = dsbr100_setfreq(radio, radio->curfreq); + + if (retval == -1) + printk(KERN_WARNING KBUILD_MODNAME ": Set frequency failed\n"); + unlock_kernel(); return 0; } |