diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-10-11 18:39:38 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-10-17 18:20:29 -0400 |
commit | 305a7e87055dde2466a855c24ef51a606915d149 (patch) | |
tree | 7cfe3df3901ad99677dc1794d684894db8bf5a38 /drivers/infiniband | |
parent | 5b6810e048435de508ef66aebd6b78db13d651b8 (diff) |
[IB] uverbs: unlock correctly in error paths
A couple of functions were missing spin_unlock calls in error paths.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index c84cc28b60ee..3a887006b253 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c | |||
@@ -312,8 +312,10 @@ void ib_uverbs_comp_handler(struct ib_cq *cq, void *cq_context) | |||
312 | } | 312 | } |
313 | 313 | ||
314 | entry = kmalloc(sizeof *entry, GFP_ATOMIC); | 314 | entry = kmalloc(sizeof *entry, GFP_ATOMIC); |
315 | if (!entry) | 315 | if (!entry) { |
316 | spin_unlock_irqrestore(&file->lock, flags); | ||
316 | return; | 317 | return; |
318 | } | ||
317 | 319 | ||
318 | uobj = container_of(cq->uobject, struct ib_ucq_object, uobject); | 320 | uobj = container_of(cq->uobject, struct ib_ucq_object, uobject); |
319 | 321 | ||
@@ -343,8 +345,10 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file, | |||
343 | } | 345 | } |
344 | 346 | ||
345 | entry = kmalloc(sizeof *entry, GFP_ATOMIC); | 347 | entry = kmalloc(sizeof *entry, GFP_ATOMIC); |
346 | if (!entry) | 348 | if (!entry) { |
349 | spin_unlock_irqrestore(&file->async_file->lock, flags); | ||
347 | return; | 350 | return; |
351 | } | ||
348 | 352 | ||
349 | entry->desc.async.element = element; | 353 | entry->desc.async.element = element; |
350 | entry->desc.async.event_type = event; | 354 | entry->desc.async.event_type = event; |