Merge gregkh@master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
[pandora-kernel.git] / drivers / media / video / videodev.c
index caa4f73..88bf2af 100644 (file)
@@ -760,7 +760,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
                ret=vfd->vidioc_overlay(file, fh, *i);
                break;
        }
-#ifdef CONFIG_V4L1_COMPAT
+#ifdef CONFIG_VIDEO_V4L1_COMPAT
        /* --- streaming capture ------------------------------------- */
        case VIDIOCGMBUF:
        {
@@ -1575,15 +1575,16 @@ 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__);
-               return ret;
+               goto fail_minor;
        }
        ret = class_device_create_file(&vfd->class_dev, &class_device_attr_name);
        if (ret < 0) {
-               printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret);
-               return ret;
+               printk(KERN_ERR "%s: class_device_create_file 'name' failed\n",
+                      __FUNCTION__);
+               goto fail_classdev;
        }
 
 #if 1