Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] [patch] av7110.c - missing release_firmware



Hi again.

Johannes: Thanks for fixing and applying my previous patches!

Here is another one that adds release_firmware to av7110.c

Kenneth


Index: av7110.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/ttpci/av7110.c,v
retrieving revision 1.126
diff -u -r1.126 av7110.c
--- av7110.c	21 Jun 2004 14:21:19 -0000	1.126
+++ av7110.c	21 Jun 2004 17:13:20 -0000
@@ -1321,20 +1321,27 @@
 			       " (error %i)\n", ret);
 		return -EINVAL;
 	}
+
 	if (fw->size <= 200000) {
 		printk("dvb-ttpci: this firmware is way too small.\n");
+		release_firmware(fw);
 		return -EINVAL;
 	}
+
 	/* check if the firmware is available */
 	av7110->bin_fw = (unsigned char*) vmalloc(fw->size);
 	if (NULL == av7110->bin_fw) {
 		DEB_D(("out of memory\n"));
+		release_firmware(fw);
 		return -ENOMEM;
 	}
+
 	memcpy(av7110->bin_fw, fw->data, fw->size);
 	av7110->size_fw = fw->size;
 	if ((ret = check_firmware(av7110)))
 		vfree(av7110->bin_fw);
+
+	release_firmware(fw);
 	return ret;
 }
 #endif

Home | Main Index | Thread Index