patch-2.2.19 linux/drivers/s390/net/iucv.c

Next file: linux/drivers/s390/net/netiucv.c
Previous file: linux/drivers/s390/net/ctc.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.18/drivers/s390/net/iucv.c linux/drivers/s390/net/iucv.c
@@ -9,6 +9,8 @@
  *               Alan Altmark (Alan_Altmark@us.ibm.com)
  */
 
+#include <linux/module.h>
+#include <linux/config.h>
 #include <linux/version.h>
 #include <linux/kernel.h>
 #include <linux/malloc.h>
@@ -28,8 +30,6 @@
 //#define DEBUG         /* Turns Printk's on                         */
 //#define DEBUG2        /* This prints the parameter list before and */
 		      /* after the b2f0 call to cp                 */
-#define EXPORT_SYMTAB
-#include <linux/module.h>
 #undef NULL
 #define NULL 0
 #define ADDED_STOR 64		/* ADDITIONAL STORAGE FOR PATHID @'S */
@@ -1533,7 +1533,7 @@
 {
 	iucv_packet *pkt;
 	pkt = (iucv_packet *) kmalloc
-	    (sizeof (iucv_packet), GFP_KERNEL | GFP_ATOMIC);
+	    (sizeof (iucv_packet), GFP_ATOMIC);
 	if (pkt == NULL) {
 		printk (KERN_DEBUG "out of memory\n");
 		return;
@@ -1869,15 +1869,16 @@
 	new_handler->size = ADDED_STOR;
 	/* Allocate storage for pathid table */
 	new_handler->start = kmalloc (ADDED_STOR * sizeof (ulong), GFP_KERNEL);
-	memset (new_handler->start, 0, ADDED_STOR * sizeof (ulong));
 	if (new_handler->start == NULL) {
 #ifdef DEBUG
 		printk (KERN_DEBUG
 			"IUCV: returned NULL address for pathid table,"
 			" exiting\n");
 #endif
+		kfree(new_handler);
 		return NULL;
 	}
+	memset (new_handler->start, 0, ADDED_STOR * sizeof (ulong));
 	new_handler->end = (*new_handler).start + ADDED_STOR;
 	new_handler->next = 0;
 	new_handler->prev = 0;

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