summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorRashika Kheria <rashika.kheria@gmail.com>2013-10-27 13:19:31 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-27 13:43:23 (GMT)
commit16fcfa17d52f9f9e4e2f02a5b078b078eb5eabf3 (patch)
tree4a491c0960d93ab66a8749e82e9a01c1dd832ed8 /drivers/staging
parentb6ea5ef80aa7fd6f4b18ff2e4174930e8772e812 (diff)
downloadlinux-fsl-qoriq-16fcfa17d52f9f9e4e2f02a5b078b078eb5eabf3.tar.xz
Staging: lustre: Fix no use of assignment in if condition
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/lustre/lustre/ldlm/interval_tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/interval_tree.c b/drivers/staging/lustre/lustre/ldlm/interval_tree.c
index fbe7672..1de1d8e 100644
--- a/drivers/staging/lustre/lustre/ldlm/interval_tree.c
+++ b/drivers/staging/lustre/lustre/ldlm/interval_tree.c
@@ -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);