diff options
author | Alexey Klimov <klimov.linux@gmail.com> | 2008-10-19 23:00:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-21 12:29:29 -0400 |
commit | b9f3573731e63116712eb5ea28bd6ded09232afa (patch) | |
tree | caa2c91768b7e93030a6db8a5dc0a2228954c268 | |
parent | 0fabb78332aee7d5dd4a0a31228b9266de71182f (diff) |
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>
-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 e88c58ea1b76..a5ca176a7b08 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, | |||
411 | static int usb_dsbr100_open(struct inode *inode, struct file *file) | 411 | static int usb_dsbr100_open(struct inode *inode, struct file *file) |
412 | { | 412 | { |
413 | struct dsbr100_device *radio = video_drvdata(file); | 413 | struct dsbr100_device *radio = video_drvdata(file); |
414 | int retval; | ||
414 | 415 | ||
415 | lock_kernel(); | 416 | lock_kernel(); |
416 | radio->users = 1; | 417 | radio->users = 1; |
@@ -423,7 +424,12 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file) | |||
423 | unlock_kernel(); | 424 | unlock_kernel(); |
424 | return -EIO; | 425 | return -EIO; |
425 | } | 426 | } |
426 | dsbr100_setfreq(radio, radio->curfreq); | 427 | |
428 | retval = dsbr100_setfreq(radio, radio->curfreq); | ||
429 | |||
430 | if (retval == -1) | ||
431 | printk(KERN_WARNING KBUILD_MODNAME ": Set frequency failed\n"); | ||
432 | |||
427 | unlock_kernel(); | 433 | unlock_kernel(); |
428 | return 0; | 434 | return 0; |
429 | } | 435 | } |