]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Staging: lustre: Fix no use of assignment in if condition
authorRashika Kheria <rashika.kheria@gmail.com>
Sun, 27 Oct 2013 13:19:31 +0000 (18:49 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Oct 2013 13:43:23 +0000 (06:43 -0700)
This patch fixes the following checkpatch.pl error in lustre/ldlm/interval_tree.c-
ERROR: do not use assignment in if condition

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/interval_tree.c

index fbe76725d94559bf931c8f6edc9d2b56fe6f710d..1de1d8eb9b415dca27b8b05b861242f402093ae9 100644 (file)
@@ -427,7 +427,8 @@ static void interval_erase_color(struct interval_node *node,
                        } else {
                                if (node_is_black_or_0(tmp->in_right)) {
                                        struct interval_node *o_left;
-                                       if ((o_left = tmp->in_left))
+                                       o_left = tmp->in_left;
+                                       if (o_left)
                                                o_left->in_color = INTERVAL_BLACK;
                                        tmp->in_color = INTERVAL_RED;
                                        __rotate_right(tmp, root);
@@ -457,7 +458,8 @@ static void interval_erase_color(struct interval_node *node,
                        } else {
                                if (node_is_black_or_0(tmp->in_left)) {
                                        struct interval_node *o_right;
-                                       if ((o_right = tmp->in_right))
+                                       o_right = tmp->in_right;
+                                       if (o_right)
                                                o_right->in_color = INTERVAL_BLACK;
                                        tmp->in_color = INTERVAL_RED;
                                        __rotate_left(tmp, root);