]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
V4L/DVB (9306): dsbr100: Add frequency check
authorAlexey Klimov <klimov.linux@gmail.com>
Mon, 20 Oct 2008 03:00:03 +0000 (00:00 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 21 Oct 2008 16:29:29 +0000 (14:29 -0200)
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>
drivers/media/radio/dsbr100.c

index e88c58ea1b76eb2575088334d23f89e31243a1c0..a5ca176a7b083a80ef5201d2ac57d1a3475bbbbb 100644 (file)
@@ -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;
 }