diff mbox

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

Message ID 4B1CFFBA.8060407@gmail.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Roel Kluin Dec. 7, 2009, 1:14 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 56feab6..112d397 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -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;
 	}