]> err.no Git - linux-2.6/blobdiff - drivers/media/common/saa7146_fops.c
Merge branch 'pxa-devel' into pxa
[linux-2.6] / drivers / media / common / saa7146_fops.c
index b40bf2306fbc70fd09bead39e474efc97c06563d..171afe7da6b60e9d66dd78259d987aada6eb0dfa 100644 (file)
@@ -272,7 +272,7 @@ static int fops_open(struct inode *inode, struct file *file)
 
        result = 0;
 out:
-       if( fh != 0 && result != 0 ) {
+       if (fh && result != 0) {
                kfree(fh);
                file->private_data = NULL;
        }
@@ -538,6 +538,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
        // fixme: -1 should be an insmod parameter *for the extension* (like "video_nr");
        if (video_register_device(vfd, type, -1) < 0) {
                ERR(("cannot register v4l2 device. skipping.\n"));
+               video_device_release(vfd);
                return -1;
        }