aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2006-07-19 12:23:38 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-07-29 16:22:21 -0400
commit3117beec7e43f91ce156cacf033a712c7e22737d (patch)
treee661e3bbd6ebcd5537bfb7e526d8bbc55a3b0ebc /include
parentd9cd2d9b61898354f5dbabdc490dd6ef309ebbd4 (diff)
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 'include')
-rw-r--r--include/media/v4l2-dev.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 62dae1a8c441..f8665326ed9f 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -341,11 +341,14 @@ extern int video_usercopy(struct inode *inode, struct file *file,
341extern struct video_device* video_devdata(struct file*); 341extern struct video_device* video_devdata(struct file*);
342 342
343#define to_video_device(cd) container_of(cd, struct video_device, class_dev) 343#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
344static inline void 344static inline int
345video_device_create_file(struct video_device *vfd, 345video_device_create_file(struct video_device *vfd,
346 struct class_device_attribute *attr) 346 struct class_device_attribute *attr)
347{ 347{
348 class_device_create_file(&vfd->class_dev, attr); 348 int ret = class_device_create_file(&vfd->class_dev, attr);
349 if (ret < 0)
350 printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret);
351 return ret;
349} 352}
350static inline void 353static inline void
351video_device_remove_file(struct video_device *vfd, 354video_device_remove_file(struct video_device *vfd,