]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/misc/sgi-xp/xpc_channel.c
Merge branch 'omap-pool'
[linux-2.6-omap-h63xx.git] / drivers / misc / sgi-xp / xpc_channel.c
index 45fd653dbe311b5d5c775e8ae8ee753a04b769c7..99a2534c38a1ffa092ecc9f1334a8d12aff1a16f 100644 (file)
@@ -183,6 +183,7 @@ xpc_process_openclose_chctl_flags(struct xpc_partition *part, int ch_number,
            &part->remote_openclose_args[ch_number];
        struct xpc_channel *ch = &part->channels[ch_number];
        enum xp_retval reason;
+       enum xp_retval ret;
 
        spin_lock_irqsave(&ch->lock, irq_flags);
 
@@ -399,8 +400,13 @@ again:
                DBUG_ON(args->local_nentries == 0);
                DBUG_ON(args->remote_nentries == 0);
 
+               ret = xpc_save_remote_msgqueue_pa(ch, args->local_msgqueue_pa);
+               if (ret != xpSuccess) {
+                       XPC_DISCONNECT_CHANNEL(ch, ret, &irq_flags);
+                       spin_unlock_irqrestore(&ch->lock, irq_flags);
+                       return;
+               }
                ch->flags |= XPC_C_ROPENREPLY;
-               xpc_save_remote_msgqueue_pa(ch, args->local_msgqueue_pa);
 
                if (args->local_nentries < ch->remote_nentries) {
                        dev_dbg(xpc_chan, "XPC_CHCTL_OPENREPLY: new "