IB/uverbs: Fix return of PTR_ERR() of wrong pointer in ib_uverbs_get_context()
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 9 Dec 2009 22:30:44 +0000 (14:30 -0800)
committerRoland Dreier <rolandd@cisco.com>
Wed, 9 Dec 2009 22:30:44 +0000 (14:30 -0800)
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/uverbs_cmd.c

index 56feab6c251edd8e688647ee0cbf6617522b6e1c..112d3970222a08c3ea43af3aeeb4c9977c5546ff 100644 (file)
@@ -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;
        }