]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/rio/riotable.c
Pull virt-cpu-accounting into release branch
[linux-2.6-omap-h63xx.git] / drivers / char / rio / riotable.c
index 7e988357326e3a907e892c8ea554ce573cb6d2bb..9b52892a501f67702222eca6eedcf913783e3fc3 100644 (file)
@@ -425,8 +425,10 @@ int RIOApel(struct rio_info *p)
 
                MapP = &p->RIOConnectTable[Next++];
                MapP->HostUniqueNum = HostP->UniqueNum;
-               if ((HostP->Flags & RUN_STATE) != RC_RUNNING)
+               if ((HostP->Flags & RUN_STATE) != RC_RUNNING) {
+                       rio_spin_unlock_irqrestore(&HostP->HostLock, flags);
                        continue;
+               }
                MapP->RtaUniqueNum = 0;
                MapP->ID = 0;
                MapP->Flags = SLOT_IN_USE;
@@ -863,8 +865,7 @@ int RIOReMapPorts(struct rio_info *p, struct Host *HostP, struct Map *HostMapP)
                if (PortP->TxRingBuffer)
                        memset(PortP->TxRingBuffer, 0, p->RIOBufferSize);
                else if (p->RIOBufferSize) {
-                       PortP->TxRingBuffer = kmalloc(p->RIOBufferSize, GFP_KERNEL);
-                       memset(PortP->TxRingBuffer, 0, p->RIOBufferSize);
+                       PortP->TxRingBuffer = kzalloc(p->RIOBufferSize, GFP_KERNEL);
                }
                PortP->TxBufferOut = 0;
                PortP->TxBufferIn = 0;