From: Alexey Klimov Date: Mon, 20 Oct 2008 03:00:03 +0000 (-0300) Subject: V4L/DVB (9306): dsbr100: Add frequency check X-Git-Tag: v2.6.28-rc1~37^2~27 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b9f3573731e63116712eb5ea28bd6ded09232afa;p=linux-2.6-omap-h63xx.git V4L/DVB (9306): dsbr100: Add frequency check Add checking for frequency and printk if -1 returned. Signed-off-by: Alexey Klimov Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c index e88c58ea1b7..a5ca176a7b0 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; }