mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
V4L/DVB (4379): Videodev: Check return value of class_device_register() correctly
Errors are return values < 0, not != 0. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
08d4180836
commit
8c313111a2
@ -1575,7 +1575,7 @@ int video_register_device(struct video_device *vfd, int type, int nr)
|
||||
vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor);
|
||||
sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base);
|
||||
ret = class_device_register(&vfd->class_dev);
|
||||
if (ret) {
|
||||
if (ret < 0) {
|
||||
printk(KERN_ERR "%s: class_device_register failed\n",
|
||||
__FUNCTION__);
|
||||
goto fail_minor;
|
||||
|
Loading…
Reference in New Issue
Block a user