summaryrefslogtreecommitdiff
path: root/drivers/media/video/bt8xx
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2006-07-19 13:23:38 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-07-29 17:22:21 -0300
commit3117beec7e43f91ce156cacf033a712c7e22737d (patch)
treee661e3bbd6ebcd5537bfb7e526d8bbc55a3b0ebc /drivers/media/video/bt8xx
parentd9cd2d9b61898354f5dbabdc490dd6ef309ebbd4 (diff)
downloadlinux-3117beec7e43f91ce156cacf033a712c7e22737d.tar.gz
linux-3117beec7e43f91ce156cacf033a712c7e22737d.tar.xz
V4L/DVB (4316): Check __must_check warnings
Check __must_check warnings for class_device_register and class_device_create_file video_device_create_file was declared as a void, but instead should return the int value of class_device_create_file. Move the check from bttv-driver.c into v4l2-dev.h, because all other callers of video_device_create_file must also be checked. Replace the call to class_device_create_file in videodev.c with video_device_create_file, as defined in v4l2-dev.h, so that the return value of class_device_create_file will be checked. Check the return value of class_device_register in videodev.c and pvrusb2-sysfs.c Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/bt8xx')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 63e83162286c..6db5e4e73397 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -3909,8 +3909,6 @@ static void bttv_unregister_video(struct bttv *btv)
/* register video4linux devices */
static int __devinit bttv_register_video(struct bttv *btv)
{
- int ret;
-
if (no_overlay <= 0) {
bttv_video_template.type |= VID_TYPE_OVERLAY;
} else {
@@ -3925,10 +3923,8 @@ static int __devinit bttv_register_video(struct bttv *btv)
goto err;
printk(KERN_INFO "bttv%d: registered device video%d\n",
btv->c.nr,btv->video_dev->minor & 0x1f);
- ret = video_device_create_file(btv->video_dev, &class_device_attr_card);
- if (ret < 0)
- printk(KERN_WARNING "bttv: video_device_create_file error: "
- "%d\n", ret);
+
+ video_device_create_file(btv->video_dev, &class_device_attr_card);
/* vbi */
btv->vbi_dev = vdev_init(btv, &bttv_vbi_template, "vbi");