[2/3,net-next] test_objagg: Test the correct variable
diff mbox series

Message ID 20190213085820.GC14113@kadam
State Accepted
Delegated to: David Miller
Headers show
Series
  • [1/3,net-next] lib: objagg: Fix an error code in objagg_hints_get()
Related show

Commit Message

Dan Carpenter Feb. 13, 2019, 8:58 a.m. UTC
There is a typo here.  We intended to check "objagg2" but we instead
test "objagg" which is not an error pointer.

Fixes: 9069a3817d82 ("lib: objagg: implement optimization hints assembly and use hints for object creation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 lib/test_objagg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jiri Pirko Feb. 13, 2019, 1:16 p.m. UTC | #1
Wed, Feb 13, 2019 at 09:58:20AM CET, dan.carpenter@oracle.com wrote:
>There is a typo here.  We intended to check "objagg2" but we instead
>test "objagg" which is not an error pointer.
>
>Fixes: 9069a3817d82 ("lib: objagg: implement optimization hints assembly and use hints for object creation")
>Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Jiri Pirko <jiri@mellanox.com>

Thanks.
David Miller Feb. 14, 2019, 6:13 a.m. UTC | #2
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 13 Feb 2019 11:58:20 +0300

> There is a typo here.  We intended to check "objagg2" but we instead
> test "objagg" which is not an error pointer.
> 
> Fixes: 9069a3817d82 ("lib: objagg: implement optimization hints assembly and use hints for object creation")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.

Patch
diff mbox series

diff --git a/lib/test_objagg.c b/lib/test_objagg.c
index 3744573b6365..3dd45777b13c 100644
--- a/lib/test_objagg.c
+++ b/lib/test_objagg.c
@@ -952,8 +952,8 @@  static int test_hints_case(const struct hints_case *hints_case)
 	}
 
 	objagg2 = objagg_create(&delta_ops, hints, &world2);
-	if (IS_ERR(objagg))
-		return PTR_ERR(objagg);
+	if (IS_ERR(objagg2))
+		return PTR_ERR(objagg2);
 
 	for (i = 0; i < hints_case->key_ids_count; i++) {
 		objagg_obj = world_obj_get(&world2, objagg2,