Преглед на файлове

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>
Alexey Klimov преди 16 години
родител
ревизия
b9f3573731
променени са 1 файла, в които са добавени 7 реда и са изтрити 1 реда
  1. 7 1
      drivers/media/radio/dsbr100.c

+ 7 - 1
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;
 }