Skip to content

Commit

Permalink
V4L/DVB (9306): dsbr100: Add frequency check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexey Klimov authored and Mauro Carvalho Chehab committed Oct 21, 2008
1 parent 0fabb78 commit b9f3573
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/media/radio/dsbr100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit b9f3573

Please sign in to comment.