patch-2.4.0-test10 linux/drivers/media/video/tda985x.c

Next file: linux/drivers/media/video/tda9875.c
Previous file: linux/drivers/media/video/tda8425.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test9/linux/drivers/media/video/tda985x.c linux/drivers/media/video/tda985x.c
@@ -11,6 +11,9 @@
  * Based on tda9855.c by Steve VanDeBogart (vandebo@uclink.berkeley.edu)
  * Which was based on tda8425.c by Greg Alexander (c) 1998
  *
+ * Contributors:
+ * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *
  * OPTIONS:
  * debug   - set to 1 if you'd like to see debug messages
  *         - set to 2 if you'd like to be flooded with debug messages
@@ -22,6 +25,7 @@
  *   Fine tune sound
  *   Get rest of capabilities into video_audio struct...
  *
+ *  Revision  0.6 - resource allocation fixes in tda985x_attach (08/14/2000)
  *  Revision  0.5 - cleaned up debugging messages, added debug level=2 
  *  Revision: 0.4 - check for correct chip= insmod value
  *                  also cleaned up comments a bit
@@ -350,8 +354,10 @@
         client->addr = addr;
 	
 	client->data = t = kmalloc(sizeof *t,GFP_KERNEL);
-	if (!t)
+	if (!t) {
+		kfree(client);
 		return -ENOMEM;
+	}
 	memset(t,0,sizeof *t);
 	do_tda985x_init(client);
 	MOD_INC_USE_COUNT;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)