Skip to contentSkip to conversation

IB/uverbs: PTR_ERR return of wrong pointer in ib_uverbs_get_context()

PATCH In review Roel Kluin 2 participants 2 messages Dec 7, 2009 – Dec 9, 2009 InfiniBand

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 IB/uverbs: PTR_ERR return of wrong pointer in ib_uverbs_get_context()

Return the PTR_ERR of the correct pointer.

---
 drivers/infiniband/core/uverbs_cmd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Unless this should be fixed otherwise?

drivers/infiniband/core/uverbs_cmd.c +1 -1
index 56feab6..112d397 100644
@@ -285,7 +285,7 @@ ssize_t ib_uverbs_get_context(struct ib_uverbs_file *file,
 
 	ucontext = ibdev->alloc_ucontext(ibdev, &udata);
 	if (IS_ERR(ucontext)) {
-		ret = PTR_ERR(file->ucontext);
+		ret = PTR_ERR(ucontext);
 		goto err;
 	}