IB/ehca: Release mutex in error path of alloc_small_queue_page()
[pandora-kernel.git] / drivers / infiniband / hw / ehca / ipz_pt_fn.c
index 29bd476..c3a3284 100644 (file)
@@ -158,10 +158,12 @@ static int alloc_small_queue_page(struct ipz_queue *queue, struct ehca_pd *pd)
 
        queue->queue_pages[0] = (void *)(page->page | (bit << (order + 9)));
        queue->small_page = page;
+       queue->offset = bit << (order + 9);
        return 1;
 
 out:
        ehca_err(pd->ib_pd.device, "failed to allocate small queue page");
+       mutex_unlock(&pd->lock);
        return 0;
 }