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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
d9cd2d9b61
commit
3117beec7e
@ -341,11 +341,14 @@ extern int video_usercopy(struct inode *inode, struct file *file,
|
||||
extern struct video_device* video_devdata(struct file*);
|
||||
|
||||
#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
|
||||
static inline void
|
||||
static inline int
|
||||
video_device_create_file(struct video_device *vfd,
|
||||
struct class_device_attribute *attr)
|
||||
{
|
||||
class_device_create_file(&vfd->class_dev, attr);
|
||||
int ret = class_device_create_file(&vfd->class_dev, attr);
|
||||
if (ret < 0)
|
||||
printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret);
|
||||
return ret;
|
||||
}
|
||||
static inline void
|
||||
video_device_remove_file(struct video_device *vfd,
|
||||
|
Reference in New Issue
Block a user