]> err.no Git - linux-2.6/commitdiff
V4L/DVB (4379): Videodev: Check return value of class_device_register() correctly
authorTrent Piepho <xyzzy@speakeasy.org>
Tue, 25 Jul 2006 23:37:03 +0000 (20:37 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sat, 29 Jul 2006 20:22:38 +0000 (17:22 -0300)
Errors are return values < 0, not != 0.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/videodev.c

index 46848e2ae4767f123d6107fa92c232709097708a..0fc90cd393f69f8331b19fd909271232ee0edf39 100644 (file)
@@ -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;