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

[PATCH] drivers/char/tea6420.c: resource alloc fix


Linus,

	  The e-mail address of the maintainer (justdave _at_ ynn.com) for this driver
is not working, please consider applying.

                        - Arnaldo

--- linux-2.4.0-test7-pre3/drivers/char/tea6420.c	Mon May 15 16:06:25 2000
+++ linux-2.4.0-test7-pre3.acme/drivers/char/tea6420.c	Tue Aug 15 10:47:09 2000
@@ -9,6 +9,9 @@
  * This code is placed under the terms of the GNU General Public License
  * Code liberally copied from msp3400.c, which is by Gerd Knorr
  *
+ * Changes:
+ * Arnaldo Carvalho de Melo <acme _at_ conectiva.com.br> - 08/14/2000
+ * - resource allocation fixes in tea6300_attach
  */
 
 #include <linux/module.h>
@@ -141,8 +144,10 @@
         client->addr = addr;
 
 	client->data = tea = kmalloc(sizeof *tea,GFP_KERNEL);
-	if (!tea)
+	if (!tea) {
+		kfree(client);
 		return -ENOMEM;
+	}
 	memset(tea,0,sizeof *tea);
 	do_tea6420_init(client);
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」