提交 b9f35737 编写于 作者: A Alexey Klimov 提交者: Mauro Carvalho Chehab

V4L/DVB (9306): dsbr100: Add frequency check

Add checking for frequency and printk if -1 returned.
Signed-off-by: NAlexey Klimov <klimov.linux@gmail.com>
Signed-off-by: NDouglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 0fabb783
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册