diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2006-07-25 19:37:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-07-29 16:22:38 -0400 |
commit | 8c313111a2c843610f58d57b4e02159fecef4bbf (patch) | |
tree | f75d835bdb46a154a8aaec8f0ff97ddfe7320e3d /drivers/media/video/videodev.c | |
parent | 08d41808362a3663c0856c9720ad940a61156fb5 (diff) |
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>
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r-- | drivers/media/video/videodev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 46848e2ae476..0fc90cd393f6 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -1575,7 +1575,7 @@ int video_register_device(struct video_device *vfd, int type, int nr) | |||
1575 | vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); | 1575 | vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); |
1576 | sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base); | 1576 | sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base); |
1577 | ret = class_device_register(&vfd->class_dev); | 1577 | ret = class_device_register(&vfd->class_dev); |
1578 | if (ret) { | 1578 | if (ret < 0) { |
1579 | printk(KERN_ERR "%s: class_device_register failed\n", | 1579 | printk(KERN_ERR "%s: class_device_register failed\n", |
1580 | __FUNCTION__); | 1580 | __FUNCTION__); |
1581 | goto fail_minor; | 1581 | goto fail_minor; |