patch-2.4.9 linux/drivers/ieee1394/hosts.c

Next file: linux/drivers/ieee1394/hosts.h
Previous file: linux/drivers/ide/via82cxxx.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/drivers/ieee1394/hosts.c linux/drivers/ieee1394/hosts.c
@@ -95,11 +95,12 @@
         struct hpsb_host *h;
 
         h = vmalloc(sizeof(struct hpsb_host) + hd_size);
-        if (h == NULL) {
-                return NULL;
-        }
+        if (!h) return NULL;
 
         memset(h, 0, sizeof(struct hpsb_host) + hd_size);
+
+        atomic_set(&h->generation, 0);
+
         INIT_LIST_HEAD(&h->pending_packets);
         spin_lock_init(&h->pending_pkt_lock);
 
@@ -239,7 +240,6 @@
         }
         spin_unlock(&templates_lock);
 
-        inc_hpsb_generation();
         return retval;
 }
 

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